/srv/irclogs.ubuntu.com/2010/12/21/#upstart.txt

bencI'm writing an upstart script for an erlang server13:21
bencthe erlang server has a script that can start/stop/ping it13:21
benchow do I combine it with the upstart script?13:22
bencwhen using "status myserver" I guess I'm asking upstart what it thinks but this functionality is already implemented in the server itself13:22
KeybukUpstart is designed with the idea that services don't just fall over by themselves and stay running13:26
Keybukso you should find that your "status" script is unnecessary13:26
Keybukgee, hang around for the answer, why don't you13:27
=== apachelogger_ is now known as apachelogger
bencwhat is the upstart version on ubuntu 10.10?13:52
Keybukbenc: 0.6.7-1 currently13:57
bencthanks13:57
Keybukbenc: http://launchpad.net/ubuntu/+source/upstart is the place to check that kind of thing out13:58
bencok14:01
Keybukbenc: before you vanished earlier, I was going to suggest the following14:02
Keybuk  exec command-to-start-erlang-server14:02
Keybuk  pre-stop exec command-to-stop-erlang-server14:02
Keybukthat may or may not work for you14:03
Keybukif it doesn't, you may be able to do14:03
Keybuk  pre-start command-to-start-erlang-server14:03
Keybuk  post-stop command-to-stop-erlang-server14:03
Keybuk(with no exec or script)14:03
Keybukerr pre-start exec, post-stop exec14:03
Keybukbut no exec/script on their own14:03
bencyour first suggestion seems right14:03
bencwhat about status?14:03
bencwhich is ping in my server script14:04
Keybukthere isn't support for overriding that in 0.614:04
Keybukbecause upstart assumes that if the pid is alive, then the service is running14:04
bencand logs?14:04
bencmaybe if the pid is alive the erlang server is running. not sure14:04
Keybukthere's a conversation on ubuntu-devel about extending the "service" command to run custom status scripts14:05
Keybukthat might interest you14:05
bencon ubuntu-devel in irc?14:07
JanCthe mailing list14:07
bencthanks. searching14:08
pmatulisis it possible to ensure a network-required upstart job (upon shutdown) will always have the network resources available?16:11
=== mezcaler1 is now known as mezcalero
sorenWhat would be a common reason why "stop foo" would hang?21:24
JanCupstart looking at the wrong PID ?21:27
sorenPossibly.21:29
sorenI guess this thing may not actually be daemonising properly.21:29
sorenAh...21:31
sorenRight, of course.21:31
* soren plays around a bit21:32
sorenOh, I see what's going on.21:44
sorenDarn it.21:44
sorenI need a "expect <forks three times>".21:44
JanCsoren: good luck with that ;)21:45
ionYou need Upstart 0.10 :-)21:45
SpamapSsoren: guessing you have a script + an oldschool daemon (forks twice) ?22:23

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!