Skip to content

Instantly share code, notes, and snippets.

@masylum
Created December 8, 2011 14:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masylum/1447136 to your computer and use it in GitHub Desktop.
Save masylum/1447136 to your computer and use it in GitHub Desktop.
bouncy init file
#!/bin/sh
DIR=/var/www/your_app
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NODE_PATH=/usr/local/lib/node_modules
BOUNCY = /usr/local/bin/bouncy
test -x $BOUNCY || exit 0
case $1 in
start)
nohup "$BOUNCY" "$DIR/routes.json" 80 1>"$DIR/logs/bouncy.log" 2>&1 &
echo $! > "$DIR/pids/bouncy.pid";
;;
stop)
kill `cat $DIR/pids/bouncy.pid` ;;
*)
echo "usage: bouncy.sh {start|stop}" ;;
esac
exit 0
check process bouncy with pidfile /var/www/whatajong/pids/bouncy.pid
start program = "/etc/init.d/bouncy start"
stop program = "/etc/init.d/bouncy stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment