[10:30] <Epeli> Is it safe to install upstart to Debian Squeeze using apt-get?
[10:31] <Epeli> I have a clean Squeeze installation and I would like to use upstart instead of init.d scripts
[10:33] <jhunt> Epeli: I wouldn't like to say. The version in debian is very old. Keybuk was/is going to update it I believe.
[10:37] <Epeli> hmm, maybe I'll just go for Ubuntu
[18:29] <bwlang> is 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:35] <JanC> that doesn't exactly simulate a reboot...
[19:42] <simensen> I 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:51] <ion> Move the pre-start stuff from the script to a pre-start section, change “java … &” to “exec java …”, that should be about it.
[20:58] <simensen> what 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:59] <simensen> and 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.
[21:57] <SpamapS> simensen: 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] <SpamapS> simensen: console output will spit out the program's stdout/stderr on /dev/console
[21:58] <SpamapS> simensen: you can also use  exec yourprogram | logger .. but that gets tricky with expect fork
[21:59] <simensen> yeah, 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. 
[22:07] <JanC> upstart is simple in some ways, but complicated in other ways  ☺
[22:07] <simensen> :)
[22:07] <simensen> well, now it just is hanging on my process.
[22:07] <simensen> does it get confused sometimes?
[22:08] <simensen> because 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:09] <JanC> yes, currently (at least until Ubuntu 11.04) it gets confused if services fork more or less times than it expects
[22:09] <simensen> how do you recover from that?
[22:10] <simensen> can you reset it short of restarting the box?
[22:11] <JanC> there is a hack that involves attempting to create a process with the PID that upstart expects to see...
[22:12] <JanC> I think in your case it might be best to create an upstart job that has no exec stanza though
[22:12] <simensen> how so?
[22:13] <JanC> no main script/exec stanza I mean
[22:13] <JanC> call the server.sh script from the pre/start script/exec stanzas
[22:13] <simensen> hm.
[22:13] <JanC> pre/post start/stop
[22:13] <JanC> I think there is an example in the cookbook about that
[22:13] <simensen> which is the best place to run each? i thought i needed at least an exec or script?
[22:14] <JanC> not needed