# $Id: upsd.conf.sample,v 2.0.1.1 1996/01/30 09:18:06 alexis Exp alexis $ # # UPS Daemon # The Wild Wind Communications, 1995, 1996 # # See file LICENSE for the distribution terms of this software. # ups "smart-ups" (230) proto "apc-smart" { device "/dev/cuaa0" speed 2400 read-timeout 10 } every 60 { # poll the UPS poll "line-frequency" poll "line-maxvac" poll "line-minvac" poll "line-voltage" poll "temperature" tune "shutdown-delay" 20 tune "wakeup-delay" 300 } every 3600 { poll "self-test" } on "last-test" != "OK" { exec "echo UPS SELF TEST FAILED! | wall" } on "line-fail" after 10 every 30 { exec "echo Line failure occured. | wall" exec "rsh sunset 'sh -c echo Line failure occured. | wall'" } on "line-restore" after 10 { drop "line-fail" exec "echo Line has restored. | wall" exec "rsh sunset 'sh -c echo Line has restored. | wall'" } on "line-fail" after 180 { # shutdown on "line-voltage" < 30 { # lets make sure there's no line v exec "rsh sunset 'sh -c echo Shutting down. | wall'" exec "echo Shutting down. | wall" exec "rsh sunset /sbin/halt" exec "/sbin/halt" every 2 { poll "shutdown" } } }