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