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