[14:40] <foolano> ih
[14:40] <foolano> hi
[14:42] <Keybuk> hi
[15:39] <foolano> is there any way to be notfied when upstart decides to stop respawning a job because the respawning is too fast?
[15:42] <Keybuk> start on stopped foo failed respawn
[15:43] <Keybuk> (ie. the "stopped" event for "foo" (the job) will have "failed respawn" as arguments)
[15:47] <foolano> thx, gonna try that
[16:28] <foolano> works like a charm
[16:28] <foolano> this namespace thing is great
[16:29] <foolano> i lived in the past when i used runit :P
[16:49] <foolano> one more thing:
[16:50] <foolano> according to the doc: Respawning will not generate a special set of events, instead it will generate the same sequence as a restart: stopping, starting and then started.
[16:50] <Keybuk> right
[16:51] <Keybuk> say squid crashes
[16:51] <Keybuk> you'll get
[16:51] <Keybuk>   stopping squid failed main
[16:51] <Keybuk>     EXIT_SIGNAL=SEGV
[16:51] <Keybuk>   starting squid
[16:51] <Keybuk>   started squid
[16:51] <foolano> ok
[16:53] <foolano> i'd need to distinguish between a restart from a crash and a restart forced by the user
[16:53] <Keybuk> restart from a crash will say "failed"
[16:53] <Keybuk> restart by user will say "ok"
[16:54] <Keybuk> ie.
[16:54] <Keybuk>   stopping squid ok
[16:54] <Keybuk>   starting squid
[16:54] <Keybuk>   started squid
[16:54] <Keybuk> (user runs "stop squid; start squid")
[16:54] <Keybuk> it's ok, because it was expected to exit
[16:55] <foolano> gonna use that
[16:56] <Keybuk> start on stopping squid
[16:56] <Keybuk> script
[16:56] <Keybuk>   if [ "$2" = "ok" ]; then
[16:56] <Keybuk>     # normal restart
[16:56] <Keybuk>   elif [ "$2" = "failed" -a "$3" = "respawn" ]; then
[16:56] <Keybuk>     # respawn limit hit
[16:56] <Keybuk>   elif [ "$2" = "failed" ]; then
[16:56] <Keybuk>     # crashed or terminated
[16:56] <Keybuk>     # check $EXIT_STATUS or $EXIT_SIGNAL
[16:56] <Keybuk>   fi
[16:56] <Keybuk> end script
[16:57] <foolano> great
[16:57] <foolano> that's all i need :)
[16:58] <foolano> thx a lot 
[17:25] <foolano> Keybuk: the above script never enters into the last elif
[17:25] <foolano> if my daemon has the respawn option
[17:25] <foolano> if i comment it out it enters