Init.d restart service on failure


If I have a custom service in /etc/init.d and 'enabled' (ie symlinked) to rc.d, is there any way I can make that service automatically restart if it fails?

I looked at the openWrt articles here and here but I didn't see anything about restart-on-failure.

On previous systems I used systemctrl which has a "restart" option in the service file.

So is there a way to have a service restarted if it fails?

1 Like


Thanks! Exactly what I was looking for.

1 Like

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.