Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 850 Bytes
# Ok so here's how it looks like; You should store the script in
# /etc/init/yourprogram.conf, create one for each Node program you write.
description "node.js app: Space_Editor"
author ""
# used to be: start on startup
# until we found some mounts weren't ready yet while booting:
start on started mountall
stop on shutdown
# Automatically Respawn:
respawn limit 3 5
# Not sure why $HOME is needed, but we found that it is:
export HOME="/root"
export PORT=3149
exec /usr/local/bin/node /NETFS/EditorSpaceOS/app.js >> /var/log/node_EditorSpaceOS.log 2>&1
end script
post-start script
# Optionally put a script here that will notifiy you node has (re)started
# /root/bin/ "node.js has started!"
end script
# Dont forget to chmod u+x your file so it will be executable.