Execute Script when on Battery

2 1552

I connected a LI Battery to my Banana PI (Bananian 16.04). Charging and discharging works fine. I tested.

How can i execute user defined shell script for each of these events:
(1) AC Loss -> Banana Pi goes on Battery
(2) AC back again -> AC online again battery beginns to charge

thanks in advance

br daniel
Hi daniel987,

at my search for power management I found some links. They're especially for button events. But maybe they could give you glue: ... nanapro-powerbutton

Hope it'll help you.


I hope you have alreaddy gone through the links which are in Previous Comments, I was also sharing the same links to you But Its liltle late now. This Script is really usefull Like I am using surf essay from last 5 years. And They never ever let my Expecttion down. Althoght there are so many Ups and Downs during this time Period But I never Give up. And Always do what they said to me.

You have to log in before you can reply Login | Sign Up

Points Rules