1

I have a process which is started by Upstart. It will try to respwan the process n number of times on failure and after that if it fails, I want to restart my Ubuntu. I tried telinit, halt etc in the *.conf file.

But I am getting an error

 stop: Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist

Is it possible to achieve through Upstart or else is there another way to achieve the same?

1 Answer 1

0

The below link helped me for a solution.

https://lists.ubuntu.com/archives/upstart-devel/2009-December/001140.html

This means that you could just do (as a file in /etc/init):

  start on stopped $JOB RESULT=failed PROCESS=respawn
  exec /sbin/reboot

You can make that more generic if you like, a job that should cause a reboot when respawn fails could have (in its config file):

  env REBOOT_ON_RESPAWN_FAIL=1
  export REBOOT_ON_RESPAWN_FAIL

Then your reboot job could match it with:

  start on stopped REBOOT_ON_RESPAWN_FAIL=1 \
      RESULT=failed PROCESS=respawn
  exec /sbin/reboot
1
  • Hi Spike, while this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. Please take a look here: Why and how are some answers deleted?
    – bummi
    Feb 25, 2015 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .