mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
add choice to use pm2 for auto starting of MagicMirror
This commit is contained in:
parent
d71fd0ff2d
commit
4bb3d33907
@ -142,10 +142,14 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Use pm2 control like a service MagicMirror
|
# Use pm2 control like a service MagicMirror
|
||||||
sudo npm install -g pm2
|
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice
|
||||||
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
|
if [[ $choice =~ ^[Yy]$ ]]
|
||||||
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
|
then
|
||||||
pm2 save
|
sudo npm install -g pm2
|
||||||
|
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
|
||||||
|
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
|
||||||
|
pm2 save
|
||||||
|
fi
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
|
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user