1
vote
2answers
41 views

Running a python scrip using startup

I am trying to get a simple python code that I have to run in the background at startup, and stay running. The best option that I have found so far is to use Upstart. I wrote the following .conf file ...
1
vote
1answer
78 views

How to use UPSTART feature of ubuntu to restart the python script but not as root?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically and everything is working fine - ...
2
votes
1answer
109 views

Upstart cannot determine daemon's pid

There is a daemon mydaemon, which has not a very pleasant interface. So that mydaemon-parser.py was written to parse configuration files and start as many mydaemon instances as needed. ...
1
vote
1answer
215 views

How to restart python script after one second of going down using UPSTART?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically and everything is working fine - ...
4
votes
1answer
1k views

reliably restarting services using upstart or runit

I want to reliably restart my app and web server processes on crash. If I understand correctly, runit starts every service as a child process. If the child process crashes this sends a signal to the ...
2
votes
2answers
6k views

How do I run a Python script in the background and restart it after a crash?

I have a very simple Python script that I'd like to be always running on my Ubuntu 12.04 server. I thought of using upstart + monit. The problem is that those tools seem rather complicated for a ...
3
votes
1answer
2k views

Python script as a service on Ubuntu 11.10

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: Python service using Upstart on Ubuntu) I followed the ...
1
vote
1answer
476 views

Upstart for pydoc webserver

I'm trying to use upstart so that the pydoc webserver for a package I'm developing always runs. If I run it from the command line: pydoc -p 7464 /some_path/my_python_package it works fine, and ...
5
votes
2answers
806 views

Upstart not executing the exec function in upstart.conf

I have a completed upstart conf file loaded here: http://pastebin.com/5E7J5jEY but I'm having trouble with the upstart not executing the exec function and/or relinquishing the kernel console CLI back ...
6
votes
1answer
1k views

ubuntu upstart script execute a script.py program

I'm creating an upstart script to execute a python program I've written. When the service is starting I want to echo starting service - script.py... and echo the process id of the program once ...
2
votes
1answer
242 views

Using libnotify from a daemon started with upstart

I have a python script that gets messages from an MQTT server and parses them to display using libnotify. This works fine when I run it from a terminal, but when I run it using upstart I get no ...
4
votes
2answers
3k views

How do I setup gunicorn?

Upstart doesn't like to start gunicorn because it tries to call setpgrp (see github issue), what would be the best way to start [gunicorn] on a 10.04.1 server install? - Ideally with automatic ...