scripts/web2py.ubuntu.sh has a problem with starting web2py sometimes. The 
symptom is the init script is run with a start option but web2py does not 
start. 

The cause is if the start-stop-daemon program used to start python sees 
another copy of python running it will refuse to start the copy of python 
required to run web2py. This can be corrected by having the --pidfile option 
on start-stop-daemon --start, then start-stop-daemon will allow another copy 
of python to run. In the current script the pid file writing option is the 
responsibility of the web2py command as set in DAEMON_ARGS. It should be 
moved to be an option of start-stop-daemon.

Here is the output from diff from trunk after I made the changes

$ diff ../web2py-hg/scripts/web2py.ubuntu.sh web2py.ubuntu.sh 
30c30
< DAEMON_ARGS="web2py.py --password=<recycle> --pid_filename=$PIDFILE"
---
> DAEMON_ARGS="web2py.py --password=<recycle>"
65c65
<     start-stop-daemon --start --quiet \
---
>     start-stop-daemon --start --quiet --pidfile $PIDFILE \

Reply via email to