mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
add choice to use pm2 for auto starting of MagicMirror
This commit is contained in:
@@ -142,10 +142,14 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Use pm2 control like a service MagicMirror
|
# Use pm2 control like a service MagicMirror
|
||||||
|
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 npm install -g pm2
|
||||||
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
|
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
|
||||||
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
|
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
|
||||||
pm2 save
|
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"
|
||||||
|
Reference in New Issue
Block a user