mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
@@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Added
|
||||
- Add loaded function to modules, providing an async callback.
|
||||
- Add use pm2 for manager process into Installer RaspberryPi script
|
||||
|
||||
### Fixed
|
||||
- Update .gitignore to not ignore default modules folder.
|
||||
|
2
installers/mm.sh
Executable file
2
installers/mm.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
cd ~/MagicMirror
|
||||
DISPLAY=:0 npm start
|
7
installers/pm2_MagicMirror.json
Normal file
7
installers/pm2_MagicMirror.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
apps : [{
|
||||
name : "MagicMirror",
|
||||
script : "/home/pi/MagicMirror/installer/mm.sh",
|
||||
watch : ["/home/pi/MagicMirror/config/config.js"]
|
||||
}]
|
||||
}
|
@@ -148,6 +148,16 @@ else
|
||||
echo -e "\e[93mplymouth is not installed.\e[0m";
|
||||
fi
|
||||
|
||||
# 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 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"
|
||||
echo " "
|
||||
|
Reference in New Issue
Block a user