1
Development and Code Review / Re: APC UPS new plugin
« on: August 11, 2022, 11:36:25 am »though not sure if this is normal or not, i did a test to auto shutdown.
it went through the shut down process then it stopped for me to manually reboot or shutdown
the operating system has halted
please press any key to reboot
is there anything i can do to fully shutdown the device?
thanks
apcupsd actions (not the plugin) are controlled via the /usr/local/etc/apcupsd/apccontrol script.
Weirdly the FreeBSD version uses "shutdown -h now" instead of "shutdown -p now". I cannot change that in the plugin.
As a workaround, the apccontrol scripts permits overriding the default actions by creating another script named after the action (in this case "doshutdown") inside the /usr/local/etc/apcupsd/ directory.
For example you can create the script /usr/local/etc/apcupsd/doshutdown and make it executable otherwise it wont be executed by apccontrol.Code: [Select]#!/usr/bin/env sh
set -e
printf "Beginning Shutdown Sequence" | wall
/sbin/shutdown -p now "apcupsd initiated shutdown"
# 99 prevents apccontrol from executing the default doshutdown action
exit 99
thank you. was able to make it shutdown fully with the script.
though i dont actually see "begining Shutdown Sequest" and "apcupsd initiated shutdown" when the shutdown procees was happening. not sure why?
but atleast it is fully shutting down now.