I have acpid running on my system. I don't like shell scripting so I translated handler.sh's functionality into a ruby script which works fine and which I personally happen to find easier to maintain.
Anyhow, the question I have is, is it possible to have ACPId run a different file than handler.sh? For example, if I wanted to have it run "handler.rb"...
In the mean time I've just named the ruby file "handler.sh" and it works fine, but it feels hacky to have mismatched file extensions like that.
Changing the content of /etc/acpi/hanlder.sh to something like
#! /bin/sh /path/to/handler.rb
should do the trick.
Edit: don't forget to hand over the input of handler.sh to handler.rb.
Last edited by cookies (2013-06-18 18:27:19)
True, that's another option but it would entail loading up a (bourne) shell only to load up another (ruby) shell, which I was hoping to avoid
Turns out you can specify rules like this in /etc/acpi/events... So that's what I'll do. It wasn't in the man pages but it was on the internet.
Oh well. Sorry. And thanks.
Last edited by scott_fakename (2013-06-18 18:31:18)