Re: detect service crashes
On Fri, Sep 6, 2013 at 10:15 AM, Alex Efros <powerman_at_powerman.name> wrote:
> [....]
> As result, ./finish script always called with $1=-1 and $2=9 - both when
> service crash and when I manually run `sv t`.
If you cannot modify your app to behave sensibly, you can intercept the
system/sysadmin termination commands.
Wrap or replace sv with a shell script that logs -- or updates a file
timestamp or whatever -- and consult this log in ./finish to make your
determination about emailing. That will cover the common cases. If you
are too clever, you could instead log inside of ``service/control/t'' and
friends.
-Mike
Received on Fri Sep 06 2013 - 16:21:24 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:44:18 UTC