Skip to content

Instantly share code, notes, and snippets.

@jsleetw
Created February 5, 2013 13:45
Show Gist options
  • Save jsleetw/4714542 to your computer and use it in GitHub Desktop.
Save jsleetw/4714542 to your computer and use it in GitHub Desktop.
#start command, stores pid in a file in /tmp
sudo python manage.py run_gunicorn -p /tmp/gunicorn.pid -b 127.0.0.1:8000 --daemon
#save as ./start
#stop command
sudo kill `cat /tmp/gunicorn.pid` #note those aren't apostrophes, but the ~ key
#save as ./stop
#restart commad
sudo kill -HUP `cat /tmp/gunicorn.pid`
#save as ./restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment