Created
November 24, 2012 08:21
-
-
Save kain-jy/4138864 to your computer and use it in GitHub Desktop.
[rails] init script
This file contains 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 | |
BASE=$HOME/app | |
UNICORN_PID=$BASE/tmp/pids/unicorn.pid | |
case "$1" in | |
reload) | |
echo "reload..." | |
if [ ! -r $UNICORN_PID ] ; then | |
echo "no pid file found. maybe is no running." | |
exit 1 | |
fi | |
kill -USR2 `cat $UNICORN_PID` | |
echo "done" | |
;; | |
*) | |
echo "Usage: $0 {reload}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment