script for erlang server

pablo platt pablo.platt at
Thu Nov 19 20:47:39 GMT 2009


I want to use upstart for an erlang web server - mochiweb.
I havn't found an example for using upstart with erlang.

I can start mochiweb with exec erl...
but I don't understand how to properly stop the server.
I think upstart kills the process if you give it stop on shutdown
but the server needs to do some stuff before it shuts down.
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?
An erlang app can kill itself so why not use it instead?

I also not sure how to do status and reload.
The erlang server or nginx for example needs to tell you about its status
and knows how to reload
how can the upstart script knows what to do?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the upstart-devel mailing list