#!/bin/sh if [ -f /etc/apcupsd/powerfail -a "$1" = "poweroff" ]; then /etc/apcupsd/apccontrol killpower fi