Skip to content

Instantly share code, notes, and snippets.

@awagner83
Created August 19, 2010 05:48
Show Gist options
  • Select an option

  • Save awagner83/537145 to your computer and use it in GitHub Desktop.

Select an option

Save awagner83/537145 to your computer and use it in GitHub Desktop.
#!/bin/bash
gunicorn path.to.app &
MASTER_PID=$!
trap "kill $MASTER_PID; exit" INT TERM EXIT
while true
do
sleep 1
inotifywait -r -q -e modify -e create -e delete -e close_write \
--exclude=".*\.(swp|swx)" .
kill -HUP $MASTER_PID
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment