Created
April 3, 2015 09:10
-
-
Save orangle/8f659de58b8c66ddaa0d to your computer and use it in GitHub Desktop.
用到的运维脚本
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 | |
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin | |
CONFIGURE=uwsgi.ini | |
PID_FILE=/var/portal/uwsgi.pid | |
case "$@" in | |
start) | |
uwsgi --ini $CONFIGURE | |
echo "start uwsgi ok.." | |
;; | |
stop) | |
uwsgi --stop $PID_FILE | |
echo "stop uwsgi ok.." | |
;; | |
reload) | |
uwsgi --reload $PID_FILE | |
echo "reload uwsgi ok.." | |
;; | |
restart) | |
uwsgi --stop $PID_FILE | |
sleep 1 | |
uwsgi --ini $CONFIGURE | |
;; | |
*) | |
echo 'unknown arguments (start|stop|reload|restart)' | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment