diff options
author | Holger Brueckner <darks@gentoo.org> | 2001-06-28 00:09:29 +0000 |
---|---|---|
committer | Holger Brueckner <darks@gentoo.org> | 2001-06-28 00:09:29 +0000 |
commit | ce845076ecd0b87a4c9897853737b2d2369554b9 (patch) | |
tree | 6aa1a5265ad94b212296a6f2b608cf520a558a8c /sys-apps/apcupsd/files/halt | |
parent | - The SHA1 Digest module for perl. Somethings use this instead of (diff) | |
download | historical-ce845076ecd0b87a4c9897853737b2d2369554b9.tar.gz historical-ce845076ecd0b87a4c9897853737b2d2369554b9.tar.bz2 historical-ce845076ecd0b87a4c9897853737b2d2369554b9.zip |
apcupsd is a full featured management daemon for apc upc's
it has support for remote shutdown via tcp/ip
needs testing !!!
Diffstat (limited to 'sys-apps/apcupsd/files/halt')
-rwxr-xr-x | sys-apps/apcupsd/files/halt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-apps/apcupsd/files/halt b/sys-apps/apcupsd/files/halt new file mode 100755 index 000000000000..3d2a9422e266 --- /dev/null +++ b/sys-apps/apcupsd/files/halt @@ -0,0 +1,24 @@ +#!/bin/sh +# +# halt Execute the halt command. +# +# Version: @(#)halt 2.75 19-May-1998 miquels@cistron.nl +# modified by Holger Brueckner <darksi@gentoo.org> +# for apcupsd 28-June-2001 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +APCCONTROL="/etc/apcupsd/apccontrol killpower" + +# See if we need to cut the power. + +# See if this is a powerfail situation. +if [ -f /etc/apcupsd/powerfail ]; then + echo "APCUPSD to the Rescue!" + echo + $APCCONTROL + echo + sleep 120 + exit 1 +fi + +/sbin/halt -nfip |