I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system (already mentioned in the following link: http://stackoverflow.com/questions/4705564/python-script-as-linux-service-daemon/10948190#10948190)
Query is marked as closed there. Thats why posting it here now.
I followed the steps mentioned in the above mentioned link, but i got the following error message in syslog:
init: script main process (21826) terminated with status 1 Jun 8 16:59:55 bilbo kernel: [263012.984531] init: script main process ended, respawning Jun 8 16:59:55 bilbo kernel: [263013.044099] init: script main process (21827) terminated with status 1
The above two lines are getting repeated all the time.
sudo start script, I get the following:
$ sudo start script script start/running, process 21826
Following is the content of my
script.conf placed in
description "Used to start python script as a service" author "bilbo" start on runlevel  stop on runlevel  exec python /home/bilbo/scripts/webserver.py respawn
Please tell me what I am doing wrong? Do I have to change my python code as well?