Created
June 3, 2011 17:40
-
-
Save resure/1006764 to your computer and use it in GitHub Desktop.
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 | |
EXEC_PATH="/usr/local/nginx/sbin/nginx" | |
case "$1" in | |
start) | |
echo "Starting NginX" | |
start-stop-daemon --start --exec $EXEC_PATH | |
;; | |
stop) | |
echo "Stopping NginX" | |
start-stop-daemon --stop --exec $EXEC_PATH | |
;; | |
restart) | |
echo "Stopping NginX" | |
start-stop-daemon --stop --exec $EXEC_PATH | |
sleep 1 | |
echo "Starting NginX" | |
start-stop-daemon --start --exec $EXEC_PATH | |
;; | |
*) | |
echo "Usage: {start|stop|restart}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment