Reputation: 713
I'm using a Bootle Python Web Framework to develop webapps on Ubuntu. Is there any effective way to daemonize script that starts default bottlepy webserver?
Thank you.
UPD: Now I'm using Supervisord for this purposes.
Upvotes: 3
Views: 3397
Reputation: 41
On ubuntu I use following steps:
bottle.TEMPLATE_PATH
chmod +x <script_name>
)<script_symlink_name>
<script_symlink_name>
<path_to_script_symlink>
start-stop-daemon
(line w/o "--test" switch) in do_start()
service <script name> start
"update-rc.d <script-name> defaults
Upvotes: 3
Reputation: 25039
As reclosedev mentions, nohup ... &
will work without fuss.
You can also use something like daemonize Which has more options than using nohup
.
Personally I run the following while developing with autoreload switched on:
while true; do python app.py ; done
which restarts the server if I write something stupid. Other solutions will force you to restart your server for a syntax error.
Deployment happens behind apache or lighttpd.
Upvotes: 4