<div dir="ltr">Hi,<br><br>I want to use upstart for an erlang web server - mochiweb. <br>I havn't found an example for using upstart with erlang.<br><br>I can start mochiweb with exec erl... <br>but I don't understand how to properly stop the server.<br>
I think upstart kills the process if you give it stop on shutdown<br>but the server needs to do some stuff before it shuts down.<br>I can use pre-stop script to call the server with exec and tell it to prepare to stop but then why not just stopping it in this script?<br>
An erlang app can kill itself so why not use it instead?<br><br>I also not sure how to do status and reload.<br>The erlang server or nginx for example needs to tell you about its status and knows how to reload<br>how can the upstart script knows what to do?<br>
<br>Thanks<br></div>