Configure the UPS apcupsd demon to run a script?

8,293

Solved by creating a custom shell script and place it under /ect/apcupsd with the exact name of doshutdown which is triggered when a configured condition is met (either the remaining time of the battery or the remaining percentage - both based on the ups calculations) , the script contains my desired actions and if it ends with exit 0 so the shut down sequence will continue by the apcups demon after the script finishes and make the script ends with exit 99 to makes the shell script actions the only responder when the configured conditions met.

Share:
8,293

Related videos on Youtube

BluesRhythm
Author by

BluesRhythm

Updated on September 18, 2022

Comments

  • BluesRhythm
    BluesRhythm almost 2 years

    I have a ups connected to a Linux server with a usb cable, i installed apcupsd demon and i was wondering how to instruct it to run a shell script i created when a special condition occurs? i.e. the battery is 25% percent or the time left is 10 minutes so this condition can run the script?

  • BluesRhythm
    BluesRhythm over 11 years
    Dear, Read the question again I'm asking for an example, i already been through the documents but i'm not sure which is which?