Skip to content

initscript: restart background services when they fail after a 1s delay

Martin Roukala requested to merge auto-restart-background-services into master

To identify issues, we will let stderr go through, and add logging information such as PID and timestamp which enable correlating the message with the service being run.

Implementing this in shell was a real pain as interprocess communication in shell is pretty limited! I ended up using util-linux's unshare which makes sure that all the children process are killed when the script we want to run dies.

Anyway, next time I need to plan for another "simple" feature, I will first rewrite the base initscript in Go!

Merge request reports

Loading