Allow Commands To Run After Backgrounding Django Runserver Command In A Bash Script?
I'm writing a 'simple' script to start up the django server, background it then start up firefox while I dev. I've seen the
Solution 1:
You can put all your command in parenthesis like this :
(python ./manage.py runserver --settings=project.settings.$SETTING_ENV < /dev/null &)
When you run a command between parentheses it will create a new sub-shell so when you will quit the shell the command will continues to run.
Or you can also use disown or nohup :
python ./manage.py runserver --settings=project.settings.$SETTING_ENV < /dev/null &
disown
-
nohup python ./manage.py runserver --settings=project.settings.$SETTING_ENV < /dev/null &
Post a Comment for "Allow Commands To Run After Backgrounding Django Runserver Command In A Bash Script?"