[13:21] <benc> I'm writing an upstart script for an erlang server
[13:21] <benc> the erlang server has a script that can start/stop/ping it
[13:22] <benc> how do I combine it with the upstart script?
[13:22] <benc> when using "status myserver" I guess I'm asking upstart what it thinks but this functionality is already implemented in the server itself
[13:26] <Keybuk> Upstart is designed with the idea that services don't just fall over by themselves and stay running
[13:26] <Keybuk> so you should find that your "status" script is unnecessary
[13:27] <Keybuk> gee, hang around for the answer, why don't you
[13:52] <benc> what is the upstart version on ubuntu 10.10?
[13:57] <Keybuk> benc: 0.6.7-1 currently
[13:57] <benc> thanks
[13:58] <Keybuk> benc: http://launchpad.net/ubuntu/+source/upstart is the place to check that kind of thing out
[14:01] <benc> ok
[14:02] <Keybuk> benc: before you vanished earlier, I was going to suggest the following
[14:02] <Keybuk>   exec command-to-start-erlang-server
[14:02] <Keybuk>   pre-stop exec command-to-stop-erlang-server
[14:03] <Keybuk> that may or may not work for you
[14:03] <Keybuk> if it doesn't, you may be able to do
[14:03] <Keybuk>   pre-start command-to-start-erlang-server
[14:03] <Keybuk>   post-stop command-to-stop-erlang-server
[14:03] <Keybuk> (with no exec or script)
[14:03] <Keybuk> err pre-start exec, post-stop exec
[14:03] <Keybuk> but no exec/script on their own
[14:03] <benc> your first suggestion seems right
[14:03] <benc> what about status?
[14:04] <benc> which is ping in my server script
[14:04] <Keybuk> there isn't support for overriding that in 0.6
[14:04] <Keybuk> because upstart assumes that if the pid is alive, then the service is running
[14:04] <benc> and logs?
[14:04] <benc> maybe if the pid is alive the erlang server is running. not sure
[14:05] <Keybuk> there's a conversation on ubuntu-devel about extending the "service" command to run custom status scripts
[14:05] <Keybuk> that might interest you
[14:07] <benc> on ubuntu-devel in irc?
[14:07] <JanC> the mailing list
[14:08] <benc> thanks. searching
[16:11] <pmatulis> is it possible to ensure a network-required upstart job (upon shutdown) will always have the network resources available?
[21:24] <soren> What would be a common reason why "stop foo" would hang?
[21:27] <JanC> upstart looking at the wrong PID ?
[21:29] <soren> Possibly.
[21:29] <soren> I guess this thing may not actually be daemonising properly.
[21:31] <soren> Ah...
[21:31] <soren> Right, of course.
[21:32]  * soren plays around a bit
[21:44] <soren> Oh, I see what's going on.
[21:44] <soren> Darn it.
[21:44] <soren> I need a "expect <forks three times>".
[21:45] <JanC> soren: good luck with that ;)
[21:45] <ion> You need Upstart 0.10 :-)
[22:23] <SpamapS> soren: guessing you have a script + an oldschool daemon (forks twice) ?