-
-
Save phouse512/a0fc152e09422ee882f3 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/bash | |
# run if user hits control-c | |
control_c() | |
{ | |
echo "Oh no, exiting!" | |
for pid in $(cat gunicorn.pid) | |
do | |
echo "killing $pid" | |
kill -SIGKILL $pid | |
done | |
rm gunicorn.pid | |
exit $? | |
} | |
# trap keyboard interrupt (control-c) | |
trap control_c SIGINT | |
gunicorn -c reloader.py --workers=2 --worker-class=gevent --pid=gunicorn.pid devwsgi:app & | |
while true; do | |
: | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment