/srv/irclogs.ubuntu.com/2010/04/30/#upstart.txt

=== mclasen is now known as mclasen_afk
=== mclasen_afk is now known as mclasen
melterhow do i specify in a script what to do when a service is stopped or restarted?19:16
sadmacmelter: depends on what that script does and how it relates to the script stopping19:17
melterit's for a database19:17
sadmacmelter: what does it do?19:18
melterstarts the database at boot and shuts it down when the server is rebooted; i've also got other scripts, but that's the one i'm re-writing atm19:18
melteris there a complete upstart reference somewhere?19:19
sadmacmelter: man 5 init19:19
melterit looks like pre-stop will work, but what does "It will be run before the job's stopping(7) event is emitted and before the main process is killed." mean? Will a stop command kill my database process?19:23
sadmaceventually, yes19:23
melterso how do i safely shut down something important without data loss?19:24
sadmacin pre-stop you'd quiesce it and halt it19:25
meltersadmac: thanks19:26
ion<@ahu> classic 'One of our Google Summer of Code students took this to heart and implemented a binary search that was unfortunately not only incorrect but also slower than the linear search'21:58
ionkeybuk: It might be nice to have watershed-like functionality for tasks. ‘start foo’ if foo is already running would OR the ‘start_again’ flag for the instance with TRUE and when the instance stops, it would be started again if start_again is true.23:11
Keybukyeah, I can see why that'd be useful23:12
Keybuk"restart task when done if another start request came in while it was running"23:12
ionShould also happen with start-inducing events including cron-like ones and state changes.23:17
Keybuksure23:22
Keybuksame thing really23:22
ionYeah23:23
Keybukmy next two weeks are going to be trying to write down Upstart design stuff23:25
Keybukdraw pretty diagrams etc.23:25
ionAlright23:25

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