Created
August 25, 2017 01:29
-
-
Save casebeer/a3cbdcfe73589c62495b561d784a8224 to your computer and use it in GitHub Desktop.
Start Django and Celery, trapping SIGINT to terminate both daemons cleanly on Ctrl-C
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 | |
# | |
# Start Django and Celery, trapping SIGINT to terminate both daemons cleanly on Ctrl-C | |
# | |
PYTHON=venv/bin/python | |
DJANGO_DEV_SERVER_PORT=8000 | |
$PYTHON ./manage.py runserver $DJANGO_DEV_SERVER_PORT "$@" & | |
#$PYTHON ./manage.py celeryd & | |
trap "kill -TERM -$$" SIGINT | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment