apcupsd has been installed and configured to shutdown the machine once battery level goes below 50%, I've tested it and it works fine.
What I'm missing is I want the UPS to shutdown/hibernate once the machine is shutdown, so when power returns the machine will start back up again.
I've read I need to use Killpower command, but I'm unsure where to use this.
Inside etc/apcupsd/ appcontrol I see:
Code: Select all
doshutdown)
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
;;
Obviously I don't want the UPS shutting off before the machine is shutdown, so I'm not sure if killpower needs to be in the halt/shutdown script instead?
Any help is appreciated.