RPi init script to run NodeJsController at boot time
execute the following to install: chmod 755 *.sh sudo cp NodeJsControllerInitScript.sh /etc/init.d/mysensors sudo update-rc.d mysensors defaults sudo mkdir -p /usr/local/var/run sudo chmod -R 777 /usr/local/var/run
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# pidfile must be first argument
|
||||
PIDFILE=$1
|
||||
mkdir -p /home/pi/logs
|
||||
cd /home/pi/Arduino/NodeJsController
|
||||
/opt/node/bin/node NodeJsController.js >>/home/pi/logs/NodeJsController.log 2>&1 </dev/null &
|
||||
CHILD="$!"
|
||||
echo $CHILD > $PIDFILE
|
||||
Reference in New Issue
Block a user