Alfafa | Hi. 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 power | 12:29 |
---|---|---|
Alfafa | Is this possible? | 12:30 |
keesj | Alfafa: I guess so | 14:15 |
keesj | the thing would be to listen to uevents or are those apm events? | 14:16 |
keesj | Alfafa: again differently: upstart does not listen to many events , for every "job" / service you can define your own event names | 14:18 |
Alfafa | keesj: 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 | |
keesj | from readinf the acpid man page it really should be very easy | 14:20 |
keesj | really 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 script | 14:22 |
keesj | c) define your jobs that need to listen to the power-in-the-house | 14:22 |
Alfafa | keesj: 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 |
Alfafa | keesj: Hmm..I could also make something which listens to DBUS and emit an upstart event | 14:24 |
Alfafa | keesj: thanks for the help anyway :-) | 14:25 |
keesj | and hal will put the messages on dbus? | 14:26 |
keesj | on my ubuntu machine I simply have /etc/acpi/battery.d so a one liner would send the events to upstart | 14:27 |
Alfafa | keesj: maok. that sounds easy :-) | 14:28 |
Alfafa | keesj: I am not sure it is hal sending the dbus message. I think it is gnome-power-manager | 14:28 |
keesj | the problem mi be that acpi is not for every computer , the gnome-thingy might be more suited :p | 14:29 |
Alfafa | keesj: thanks for the help..i thin the acpi thing will work :-) | 14:32 |
keesj | yo | 14:36 |
Frymaster-UK | o/ 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 reference | 17:07 |
keesj | Frymaster-UK: not that i am aware off. download the example jobs or replaceÃment scripts | 17:10 |
Frymaster-UK | yeah :( was hoping for sommat a bit more structured | 17:10 |
keesj | if you find a real reference if would love o see it | 17:11 |
keesj | i tried finding the parsing code shortly but did not find it fast enough | 17:11 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!