mirror of
https://github.com/mysensors/MySensors.git
synced 2026-03-25 09:27:01 +01:00
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
9 lines
242 B
Bash
9 lines
242 B
Bash
#!/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
|