Created
December 12, 2011 15:31
-
-
Save iwarshak/1467866 to your computer and use it in GitHub Desktop.
nginx 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/bash | |
case "${1:-''}" in | |
'start') | |
# start commands here | |
/opt/nginx/sbin/nginx | |
;; | |
'stop') | |
# stop commands here | |
kill `cat /opt/nginx/logs/nginx.pid` | |
;; | |
'restart') | |
# restart commands here | |
kill `cat /opt/nginx/logs/nginx.pid` | |
/opt/nginx/sbin/nginx | |
;; | |
*) # no parameter specified | |
echo "Usage: $SELF start|stop|restart|reload|force-reload|status" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment