I have a simple home automation program written in Python that reads events from USB and sends commands to a server. It runs on a headless Ubuntu server. Basically, the program does a while true
loop. Now if this program should be interrupted for whatever reason, I want it to automatically restart. A few moments or even minutes of down time would not be a problem. What is the easiest way to do this? I could write a cron job to check whether the program is still there, but is there another way to do this that I might not know about?
Asked
Active
Viewed 29 times
0

Jos
- 29,224
upstart
will do what I need. – Jos May 01 '14 at 10:19