0

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?

Jos
  • 29,224
  • Yup, Upstart is what you want for now. There are others but Upstart is built-in and pretty simple. Note that this will change in newer versions of Ubuntu to Systemd. – Oli May 01 '14 at 10:19
  • Thanks, upstart will do what I need. – Jos May 01 '14 at 10:19

0 Answers0