Created
December 8, 2011 14:31
-
-
Save masylum/1447136 to your computer and use it in GitHub Desktop.
bouncy init file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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