Read the statement by Michael Teeuw here.
Restarting MM² when config.js file changes
-
For those that do a lot of testing, something I’ve found very useful as well: extract the
config.js
file out into it’s own git repo; then just switch between branches when you want to test something, that way you don’t break your “main” config file.cd ~ mkdir mmConfig cd mmConfig git init mv ~/MagicMirror/config/config.js ./config.js ln -s /home/pi/mmConfig/config.js /home/pi/MagicMirror/config/config.js git commit -am "Initial Commit" git checkout -b testing # Change and test config.js without fear of breaking it! # Use checkout -f master to switch back to your main branch
-
Hello !
I’ve followed your tutorial and it seems to work. For example my MM starts on boot.
But when my MM is open, if I press Alt+tab to open and modify my config.js file, nothing is happening (it is not restarting).
I don’t know why, do you have any idea ?Thank you !
Edit: After a reboot, this is working ! Ty
Edit2: There is a way to not completly rebooting it ? I mean doing the same thing as pressing CTRL + R, so the mirror reboots but stays on a black screen (instead of going back on the Desktop)
Edit3: If I do “pm2 stop mm.json” to stop the process and then start it again doing “pm2 start mm.json” then If I modify the config file, this is not working anymore -
Wow. Cool idea.
-
@shbatm Just want to tell you that I’ve googled this thread every single time I’ve setup a new mirror from scratch, and still love it. Thanks for making a post almost 6 years ago that still has all the info and works!
-
@looolz my install script sets up to monitor config.js. does sometimes…