- Ubuntu compatible
- Stop NodeJS properly
- LOG file support
- PID file support
- User uid:gid support
Change this parameter value in node-server script : (ex: user:user)
DAEMON_USER="{your-user-uid:your-user-gid}"
Change theses parameters value in node-exec script : (ex: /var/lib/node)
DAEMON_APP_DIR="{your-app-directory}"
$ sudo cp node-server node-exec /etc/init.d/
$ sudo cd /etc/init.d/
$ sudo chmod +x node-server node-exec
$ sudo update-rc.d node-server defaults
/etc/init.d/node-server {start|stop|status|restart|force-reload}
$ sudo /etc/init.d/node-server start
$ sudo /etc/init.d/node-server stop
$ sudo /etc/init.d/node-server restart
$ sudo cd /etc/init.d/
$ sudo update-rc.d -f node-server remove
$ sudo rm -f /etc/init.d/node-exec