Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 474 Bytes
description "Starts ntor."
author "David Banham david@banham.id.au"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
# Automatically Respawn:
respawn
respawn limit 20 5
script
USER=yourusernamehere
EXPRESS=production
# Not sure why $HOME is needed, but we found that it is:
export HOME="/home/$USER"
cd /home/$USER/ntor
sudo -u $USER NODE_ENV=$EXPRESS node /home/$USER/ntor/app.js >> /var/log/ntor.log 2>&1
end script