Skip to content

Instantly share code, notes, and snippets.

@orangle
Created April 3, 2015 09:10
Show Gist options
  • Save orangle/8f659de58b8c66ddaa0d to your computer and use it in GitHub Desktop.
Save orangle/8f659de58b8c66ddaa0d to your computer and use it in GitHub Desktop.
用到的运维脚本
#! /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