/srv/irclogs.ubuntu.com/2011/11/18/#upstart.txt

lixushi, i need an upstart script that simply logges the time when my desktop was powered on and when it shuts down16:34
lixusi am using this script http://pastebin.com/CmvtE0y816:35
lixusit works for power on but not for shutdown16: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
lixusjhunt_, thanks, i'll try that. but then my post-stop section is obsolet ?16:44
lixusforget my last message16:44
lixussome elay in my irc client16:45
SpamapSjhunt_: 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
SpamapSjhunt_: 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!