<div dir="ltr">... forgot to say that I have updated the Cookbook on this topic:<div><br></div><div>- <a href="http://upstart.ubuntu.com/cookbook/#respawn">http://upstart.ubuntu.com/cookbook/#respawn</a><br></div><div>- <a href="http://upstart.ubuntu.com/cookbook/#respawn-limit">http://upstart.ubuntu.com/cookbook/#respawn-limit</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-05 14:51 GMT+00:00 James Hunt <span dir="ltr"><<a href="mailto:james.hunt@ubuntu.com" target="_blank">james.hunt@ubuntu.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Michael,<div class="gmail_extra"><br><div class="gmail_quote">2014-03-04 19:26 GMT+00:00 Michael Barrett <span dir="ltr"><<a href="mailto:loki77@gmail.com" target="_blank">loki77@gmail.com</a>></span>:<div class="">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Is there anyway to tell the difference between these different 'stopped' situations:<div>

- The daemon was stopped by a user command (service <daemon> stop)</div></div></blockquote></div><div>$UPSTART_EVENTS will not be set in this scenario (since no event caused the job to stop - an admin intervened).</div>
<div>
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>- The daemon died, but is has not reached the respawn limit and is restarting.</div>

</div></blockquote><div>  In this scenario, $PROCESS will be set to the name of the job process that failed (for example 'pre-start', 'main').</div><div class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">
<div>- The daemon died and is not going to attempt to respawn due to whatever reason (no respawn, or reaching the respawn limit)</div></div></blockquote></div><div> In this scenario, if the respawn stanzas was specified, $PROCESS will be set to 'respawn' to denote that the respawn limit was reached.</div>

<div><br></div><div>If the respawn stanza was not specified, $PROCESS will not be set. However, in both scenarios upstart will set $EXIT_STATUS or $EXIT_SIGNAL (whichever is appropriate).</div><div><br></div><div>See stopped(7) and init(5) for further details.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks!<span><font color="#888888"><br clear="all">

<div><br></div>-- <br>Michael Barrett
</font></span></div></div><span class="HOEnZb"><font color="#888888">
<br>--<br>
upstart-devel mailing list<br>
<a href="mailto:upstart-devel@lists.ubuntu.com" target="_blank">upstart-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br>
<br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Kind regards,<br><br>James.<br>--<br>James Hunt<br>____________________________________<br>
#upstart on freenode<br><a href="http://upstart.ubuntu.com/cookbook" target="_blank">http://upstart.ubuntu.com/cookbook</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Kind regards,<br><br>James.<br>--<br>James Hunt<br>____________________________________<br>#upstart on freenode<br><a href="http://upstart.ubuntu.com/cookbook" target="_blank">http://upstart.ubuntu.com/cookbook</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br></div>
</div>