/srv/irclogs.ubuntu.com/2011/09/27/#upstart.txt

EpeliIs it safe to install upstart to Debian Squeeze using apt-get?10:30
EpeliI have a clean Squeeze installation and I would like to use upstart instead of init.d scripts10:31
jhuntEpeli: I wouldn't like to say. The version in debian is very old. Keybuk was/is going to update it I believe.10:33
Epelihmm, maybe I'll just go for Ubuntu10:37
bwlangis it a bad idea do something like this? runlevel RUNLEVEL=1 PREVLEVEL=2; runlevel RUNLEVEL=2 PREVLEVEL=1 to simulate a reboot (without unmounting the filesystems?)18:29
JanCthat doesn't exactly simulate a reboot...18:35
simensenI have a legacy app that has "server.sh start" and "server.sh stop" functionality that manages the starting and stopping of a java application (somewhere in there it launches java into the background with & ). Is there an easy/straightforward way to deal with this using upstart? Or do I have to rewrite the script?19:42
ionMove the pre-start stuff from the script to a pre-start section, change “java … &” to “exec java …”, that should be about it.19:51
simensenwhat would cause "sudo start myjob" to just hang? it never returns to the command prompt. if i control-c ( eventually ) and try to run it again it says it is already started.20:58
simensenand how do i debug these things? i can't seem to be getting any output anywhere. not sure what is going on. as far as i can tell, the code i'm putting in script and/or exec doesn't actually get run.20:59
SpamapSsimensen: if your job is mentioned in an 'and' condition in some other job, then start will hang until the other conditions are met.21:57
SpamapSsimensen: console output will spit out the program's stdout/stderr on /dev/console21:57
SpamapSsimensen: you can also use  exec yourprogram | logger .. but that gets tricky with expect fork21:58
simensenyeah, this is getting ridiculous. i thought upstart was supposed to be simple and wanted to try it out but i've already spent a few hours on it and basically haven't gotten anything to work yet. 21:59
JanCupstart is simple in some ways, but complicated in other ways  ☺22:07
simensen:)22:07
simensenwell, now it just is hanging on my process.22:07
simensendoes it get confused sometimes?22:07
simensenbecause it seems tow ork for a bit, then i think i've messed something up… but if i just rename the script from mysample.conf to mysample2.conf and run it, mysample2.conf runs just fine, but mysample.conf won't run anymore.22:08
JanCyes, currently (at least until Ubuntu 11.04) it gets confused if services fork more or less times than it expects22:09
simensenhow do you recover from that?22:09
simensencan you reset it short of restarting the box?22:10
JanCthere is a hack that involves attempting to create a process with the PID that upstart expects to see...22:11
JanCI think in your case it might be best to create an upstart job that has no exec stanza though22:12
simensenhow so?22:12
JanCno main script/exec stanza I mean22:13
JanCcall the server.sh script from the pre/start script/exec stanzas22:13
simensenhm.22:13
JanCpre/post start/stop22:13
JanCI think there is an example in the cookbook about that22:13
simensenwhich is the best place to run each? i thought i needed at least an exec or script?22:13
JanCnot needed22:14

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