melvinc wrote: ↑Wednesday 01 November 2017 22:04
Indeed that's what I see as well, so instead of duplicating the first line of the .sh script I should duplicate the compete script like I did before? But in that case when I try to run it it's always shown as stopped.
Tried it again, and it seems to work now
pi@DOMOTICZ:~ $ sudo nano /home/pi/nefiteasyhttpserver.sh
pi@DOMOTICZ:~ $ sudo nano /home/pi/nefiteasyhttpserver2.sh
pi@DOMOTICZ:~ $ chmod 755 nefiteasyhttpserver.sh
pi@DOMOTICZ:~ $ chmod 755 nefiteasyhttpserver2.sh
pi@DOMOTICZ:~ $ pm2 start /home/pi/nefiteasyhttpserver2.sh
[PM2] Starting /home/pi/nefiteasyhttpserver2.sh in fork_mode (1 instance)
[PM2] Done.
┌──────────────────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬──────────┬──────┬──────────â”
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
â”──────────────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼──────────┼──────┼──────────┤
│ nefiteasyhttpserver │ 0 │ fork │ 1005 │ online │ 694 │ 54m │ 0% │ 2.3 MB │ pi │ disabled │
│ nefiteasyhttpserver2 │ 2 │ fork │ 1225 │ online │ 0 │ 0s │ 0% │ 2.3 MB │ pi │ disabled │
└──────────────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴──────────┴──────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
pi@DOMOTICZ:~ $ pm2 save
[PM2] Saving current process list...
[PM2] Successfully saved in /home/pi/.pm2/dump.pm2
pi@DOMOTICZ:~ $ ps -ef | grep easy-server
pi 1006 1005 0 21:54 ? 00:00:06 node /usr/bin/easy-server --serial=********** --access-key=********** --password=********** --host=127.0.0.1 --port=3000
pi 1226 1225 2 22:49 ? 00:00:03 node /usr/bin/easy-server --serial=********** --access-key=********** --password=********** --host=127.0.0.1 --port=3001
pi 1249 1151 0 22:51 pts/0 00:00:00 grep --color=auto easy-server
pi@DOMOTICZ:~ $
I think this is okay or should I change anything to get it running after a restart?