#!/bin/sh cat /dev/null > /etc/power_is_failing if [ -f /var/run/shutdown.pid ] then /sbin/shutdown -c fi /sbin/shutdown -h now "THE UPS BATTERY LOW"