=== soren_ is now known as soren [21:02] I need to run couple commands on system shutdown, how can I trigger upstart script to run on shutdown / reboot? [21:14] gansbrest: start on runlevel [06] if you want it to run in parallel with shutdown... [21:15] gansbrest: start on starting rc RUNLEVEL=[06][newline]task to have it block shutdown until it is done [21:16] if I run it on starting rc - will it run only on shutdown or on boot as well? [21:37] gansbrest: RUNLEVE=[06] means "on shutdown and reboot" [21:38] I see, so start on starting rc RUNLEVEL=[06] ( no need for AND between those? ) [21:38] gansbrest: no, its not an AND, it is a filter [21:38] gansbrest: RUNLEVEL != runlevel [21:39] a bit confusing I know [21:39] I see, thanks a lot [21:39] gansbrest: 'starting rc' is the event, RUNLEVEL=[06] makes it only match if those environment vars match [22:03] one more question, I need to execute multiple commands on stop, and I'm doing it like this [22:03] task [22:04] exec cmd1 [22:04] exec cmd2 [22:04] but only cmd2 gets executed? [22:04] (basically I'm calling same command but with different options ) [22:05] exec /usr/bin/knife node delete [22:05] exec /usr/bin/knife node delete [22:05] exec /usr/bin/knife client delete [22:08] ---------------- [22:09] created simple example which illustrates the problem [22:09] task [22:09] exec echo "YOOO" > /tmp/y 2>&1 [22:09] exec echo "MUUU" > /tmp/m 2>&1 [22:09] will execute only MUUU [22:09] and I need both of them [23:02] gansbrest: you want 'script\nput stuff here\nend script' [23:02] yes, but it seems like when I use script the process keeps going [23:02] where with task it waits for process to finish [23:03] I ended up moving my commands to a separate script [23:03] and execute just that one script [23:13] gansbrest: should be identical [23:13] gansbrest: script spawns /bin/sh and pipes the rest into it. with task, the 'start on' events will block until that /bin/sh exits