=== releaselogger is now known as apachelogger [08:40] moin' jhunt ;) [08:41] can we continue the discussion ? [09:37] seems upstart is abandoned enough :) [13:10] ping jhunt [13:50] how can I wait for a server to cleanly stop in a pre-stop event? [14:01] benc: how do you check if the server is cleanly shut down? [14:03] mbiebl: I have a script /usr/bin/myserver status [14:03] if you have such a check, just add small while loop [14:03] ideally with a timeout [14:04] why a timeout? [14:04] to force stop? [14:04] yeah [14:04] thanks [14:04] say your service dead locks [14:04] you don't want a shutdown to block because of this [14:04] I need to read how to write a while loop and a timeout in a script [14:05] its simple shell [14:06] ok [14:10] benc: add [14:10] pre-stop script [14:10] [14:10] end script [14:10] to your upstart job [14:14] ok [16:37] jhunt: 'morning [16:37] SpamapS: evenin' :) [16:48] jhunt: did you have a chance to look at the telinit stuff? [16:50] SpamapS: yeah - I'm wondering if we can take a simpler approach though - maybe watch something in /proc/1/* ? [16:51] jhunt: thats what I was wondering too. when one re-execs, does its start time re-set in /proc/#/stat ? [16:51] jhunt: tho again, is /proc still mounted at umountroot time? [16:52] I think we could watch /proc/1/stat. I too was wondering about start time, but ps doesn't appear to report this as I'd expect. [16:53] Certainly, "watch -d -n1 cat /proc/#/stat" works for a script that re-execs itself. [16:53] hmmmm [17:13] testing now... [17:14] Good.. my init without the semaphore on first exec just stalls after init: Handling startup event :( [17:15] * SpamapS curses himself for forgetting to clone his pristine lucid VM again [17:16] dang - my vm wasn't exactly pristine either :( [17:31] * SpamapS waits patiently while his new VM installs. :-P [17:57] SpamapS: just mailed you a script to try. [18:00] jhunt: I'll give it a go shortly. Enjoy the evening. :) [18:00] I do like solving this in script rather than hacking in more C [18:00] given that it is a truly temporary solution [18:01] SpamapS: totally agree :) [18:01] sometimes I just get so excited to write new C.. :-D [21:49] Clint, thanks for the help on the call.