fix headlines

Christopher Fenner 2017-05-02 01:35:53 +02:00
parent b0be7a2946
commit a7c1acf691

@ -19,32 +19,32 @@ PM2 will now show you a command you need to execute.
### Make a MagicMirror start script.
To use PM2 in combination with MagicMirror, we need to make a simple shell script. Preferable, we put this script outside the MagicMirror folder to make sure it won't give us any issues if we want to upgrade the mirror.
````
````shell
cd ~
nano mm.sh
````
Add the following lines:
````
````shell
cd ~/MagicMirror
DISPLAY=:0 npm start
````
Save and close, using the commands `CTRL-O` and `CTRL-X`.
Now make sure the shell script is executable bij performing the following command:
````
````shell
chmod +x mm.sh
````
You are now ready to the MagicMirror using this script using PM2.
### Starting your MagicMirror with PM2
Simply start your mirror with the following command:
````
````shell
pm2 start mm.sh
````
You mirror should now boot up and appear on your screen after a few seconds.
### Enable restarting of the MagicMirror script.
To make sure the MagicMirror restarts after rebooting, you need to save the current state of all scripts running via PM2. To do this, execute the following command
````
````shell
pm2 save
````
@ -53,18 +53,18 @@ And that's all there is! You MagicMirror should now reboot after start, and rest
### Controlling you MagicMirror via PM2.
With your MagicMirror running via PM2, you have some handy tools at hand:
#### Restarting your MagicMirror
````
````shell
pm2 restart mm
````
#### Stopping your MagicMirror
````
````shell
pm2 stop mm
````
#### Show the MagicMirror logs
````
````shell
pm2 logs mm
````
#### Show the MagicMirror process information
````
````shell
pm2 show mm
````