#!/bin/sh # Begin /etc/rc.d/init.d/UPSdown # # Script to shutdown UPS after computer shutdown # # Written by John McSwain # # Symlink in rc0.d after umounting filesystems # # # See if this is a powerfail situation if [ -f /etc/apcupsd/powerfail ]; then echo echo "APCUPSD will now power off the UPS" echo /etc/apcupsd/apccontrol killpower echo echo "Verify the UPS shuts down or turn off the system" echo fi # # End /etc/rc.d/init.d/UPSdown