Prevent apcupsd shutting down the OS

Reading Time: 1

If you have an APC UPS you may not, for whatever reason, want the OS to trigger a shutdown. The ‘apcupsd’ package will call shutdown whenever the battery capacity is reported too low. To prevent this, just edit the following file.

8c516a38-5056-ae36-fe9e72b8749700c8_pr

Edit /etc/apcupsd/apccontrol with your favourite editor. You should see something like this:

APCPID=/var/run/apcupsd.pid
APCUPSD=/sbin/apcupsd
SHUTDOWN=/sbin/shutdown
SCRIPTSHELL=/bin/sh
SCRIPTDIR=/etc/apcupsd
WALL=wall

All you need to do is comment out the ‘WALL’ & ‘SHUTDOWN’ lines:

# SHUTDOWN=/sbin/shutdown
# WALL=wall

That should be all that’s required.