#!/bin/bash sleep 10 if [ -f /root/cubieUPS/.shutdown ]; then rm -f /root/cubieUPS/.shutdown if [ -f /root/cubieUPS/.shutdown ]; then echo "Can't remove file /root/cubieUPS/.shutdown" else /sbin/shutdown -h +1 "UPS battery level critical. Shutdown in 60 seconds. Save work and log off NOW." fi fi