Re: Inteligent service restart with s6

2016-07-25 Thread Jan Olszak
Thanks! On Mon, Jul 25, 2016 at 3:11 PM, Laurent Bercot wrote: > On 25/07/2016 14:55, Jan Olszak wrote: > >> Oh, I didn't know about ./finish. Thanks! >> > > http://skarnet.org/software/s6/s6-supervise.html tells you how to get > ./run's exit code and crash signal in ./finish. > > > The idea wi

Re: Inteligent service restart with s6

2016-07-25 Thread Laurent Bercot
On 25/07/2016 14:55, Jan Olszak wrote: Oh, I didn't know about ./finish. Thanks! http://skarnet.org/software/s6/s6-supervise.html tells you how to get ./run's exit code and crash signal in ./finish. The idea with a separate watchdog is tempting.. Is it possible to use variables stored in t

Re: Inteligent service restart with s6

2016-07-25 Thread Jan Olszak
Oh, I didn't know about ./finish. Thanks! The idea with a separate watchdog is tempting.. Is it possible to use variables stored in the /env directory for this purpose or are they overwritten by s6 on every service start? On Mon, Jul 25, 2016 at 1:55 PM, Laurent Bercot wrote: > On 25/07/2016 1

Re: Inteligent service restart with s6

2016-07-25 Thread Laurent Bercot
On 25/07/2016 13:18, Jan Olszak wrote: - Configurable sleep time before service is restarted (configured per service) - This interval should grow in case of consecutive crashes - After multiple crashes the watchdog must try to restart a crashed service at least once every 24 hours - Current "inte

Inteligent service restart with s6

2016-07-25 Thread Jan Olszak
Hi there! I have an embeded system that uses s6 as init. S6 is awesome, easy to use and works perfectly. I got to a point where I need some *more control over how services are restarted* if a crash occurred, for example: - Configurable sleep time before service is restarted (configured per servic