mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +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
|
||||
|
||||
# Use pm2 control like a service MagicMirror
|
||||
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
|
||||
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice
|
||||
if [[ $choice =~ ^[Yy]$ ]]
|
||||
then
|
||||
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 -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