/srv/irclogs.ubuntu.com/2008/03/23/#upstart.txt

AlfafaHi. I am fairly new at doing ustart scripts. But now I would like to convert an old daemontools service to upstart. What are the events upsart can listen to. I would like it to stop the service when my laptop is on battery power12:29
AlfafaIs this possible?12:30
keesjAlfafa: I guess so14:15
keesjthe thing would be to listen to uevents or are those apm events?14:16
keesjAlfafa: again differently: upstart does not listen to many events , for every "job" / service you can define your own event names14:18
Alfafakeesj: I am on ubuntu hardy. I think gnome-power-manager sends a event over DBUS..or I know it does, but I don't know how I get upstart to pick it up?14:19
* Alfafa is back. 14:19
keesjfrom readinf the acpid man page it really should be very easy14:20
keesjreally I would say a) create a job that starts the acpid on startup , b) convert the required events into upstart even "so emit power-in-the-house" in the script14:22
keesjc) define your jobs that need to listen to the power-in-the-house 14:22
Alfafakeesj: from what I understand upstart doesn't yet have a way to get DBUS events? I saw some talk of a DBUS proxy...which would convert from DBUS events to upstart events?14:22
Alfafakeesj: Hmm..I could also make something which listens to DBUS and emit an upstart event14:24
Alfafakeesj: thanks for the help anyway :-)14:25
keesjand hal will put the messages on dbus?14:26
keesjon my ubuntu machine I simply have /etc/acpi/battery.d so a one liner would send the events to upstart14:27
Alfafakeesj: maok. that sounds easy :-)14:28
Alfafakeesj: I am not sure it is hal sending the dbus message. I think it is gnome-power-manager14:28
keesjthe problem mi be that acpi is not for every computer , the gnome-thingy might be more suited :p14:29
Alfafakeesj: thanks for the help..i thin the acpi thing will work :-)14:32
keesjyo14:36
Frymaster-UKo/ is there a manpage or other documentation for writing jobs in event.d? I've found some examples and a getting started guide, but no reference17:07
keesjFrymaster-UK: not that i am aware off. download the example jobs or replaceÃment scripts17:10
Frymaster-UKyeah :( was hoping for sommat a bit more structured17:10
keesjif you find a real reference if would love o see it17:11
keesji tried finding the parsing code shortly but did not find it fast enough17:11

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