radxa-rock
Version:
GPIO interface for the Radxa Rock
27 lines (21 loc) • 649 B
Plain Text
description "Node.js Radxa Rock - Webserver"
author "Jeremy Darling <jeremy.darling@gmail.com>"
env APP_PATH=/home/rock/radxa-rock/examples/web
# Make sure network and fs is up, and start in runlevels 2-5
start on (net-device-up
and local-filesystems
and runlevel [2345])
# Stop in runlevels 0,1 and 6
stop on runlevel [016]
# Automatically Respawn:
respawn
respawn limit 5 60
pre-start script
test -x /usr/bin/node || { stop; exit 0; }
test -e $APP_PATH || { stop; exit 0; }
end script
script
export HOME="/home/rock"
cd $APP_PATH
exec /usr/bin/node server >> /var/log/rock-web.log 2>&1
end script