Skip to content

Instantly share code, notes, and snippets.

@premist
Created June 18, 2012 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save premist/2948230 to your computer and use it in GitHub Desktop.
Save premist/2948230 to your computer and use it in GitHub Desktop.
NodeServ + forever init.d script
#! /bin/bash -e
set -e
PATH=/usr/bin
DAEMON=/opt/NodeServ/server.js
case "$1" in
start) forever start $DAEMON ;;
stop) forever stop $DAEMON ;;
force-reload|restart)
forever restart $DAEMON ;;
*) echo "Usage: /etc/init.d/nodeserv {start|stop|restart|force-reload}"
exit 1 ;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment