Created
May 29, 2012 20:18
-
-
Save anonymous/2830457 to your computer and use it in GitHub Desktop.
stdin
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
#!/sbin/runscript | |
UWSGI_CONF="/etc/uwsgi/uwsgi.xml" | |
opts="depend start stop reload" | |
depend() { | |
need net | |
use nginx | |
#use apache2 lighttpd nginx | |
} | |
start() { | |
ebegin "Starting uwsgi server" | |
/usr/bin/uwsgi --pidfile /var/run/uwsgi/uwsgi.pid -x "${UWSGI_CONF}" -d /var/log/uwsgi.log --vacuum | |
eend $? "Failed to start uwsgi" | |
} | |
stop() { | |
ebegin "Stopping uwsgi server" | |
#kill -HUP `cat /var/run/uwsgi/uwsgi.pid` &> /dev/null | |
kill -HUP `pidof uwsgi` &> /dev/null | |
sleep 3 | |
eend $? "Failed to stop uwsgi" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment