Thanks! On Mon, Jul 25, 2016 at 3:11 PM, Laurent Bercot <ska-skaw...@skarnet.org> 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 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? >> > > s6 itself doesn't overwrite anything, so if you have a fixed service > directory, you can store information into it. However, I generally > recommend *copying* the service directories at boot time, and run the > supervision tree on the copies; in that case, modifications to the current > service directory will only last until the next reboot. > If you're using s6-rc, this is what happens internally: the compiled > database contains service directories which are copied to the livedir > by s6-rc-init. > > To store permanent, persistent information without having to wonder what > your exact setup is, just use another directory somewhere else in the > filesystem. :) > > -- > Laurent > >