lixus | hi, i need an upstart script that simply logges the time when my desktop was powered on and when it shuts down | 16:34 |
---|---|---|
lixus | i am using this script http://pastebin.com/CmvtE0y8 | 16:35 |
lixus | it works for power on but not for shutdown | 16:36 |
jhunt_ | lixus: try "start on filesystem or runlevel [06]" and remove the "stop on" | 16:41 |
jhunt_ | lixus: then, replace the post-start and post-stop with a simple "script" that looks at $UPSTART_EVENTS. If that variable contains "filesystem", the job was triggered on boot, else shutdown. | 16:43 |
jhunt_ | lixus: I'll add something along those lines to the cookbook the next time I update... | 16:43 |
lixus | jhunt_, thanks, i'll try that. but then my post-stop section is obsolet ? | 16:44 |
lixus | forget my last message | 16:44 |
lixus | some elay in my irc client | 16:45 |
SpamapS | jhunt_: actually I think he'd want start on filesystem or starting rc RUNLEVEL=[06] .. start on runlevel [06] will race with the actual shutdown. | 17:09 |
SpamapS | jhunt_: not that I think his process will take > 10 seconds. | 17:09 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!