APC SU1400XLT User Manual Page 61

  • Download
  • Add to my manuals
  • Print
  • Page
    / 115
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 60
generate status email from NISPORT 3552 instead of 3551.
I also have a custom init.d start/stop script to manage multiple instances. The start, stop, and status
handlers are modified to iterate over all /etc/apcupsd/apcupsd.*.conf files. This is derived from the
standard apcupsd redhat rc script:
#! /bin/sh
#
# apcupsd This shell script takes care of starting and stopping
# the apcupsd UPS monitoring daemon.
#
# chkconfig: 2345 60 99
# description: apcupsd monitors power and takes action if necessary
#
if test -f /etc/whitebox-release ; then
f=/etc/whitebox-release
else
f=/etc/redhat-release
fi
if test `cat $f | grep release |\
cut -f 3 -d ' '`x = "Enterprise"x ; then
DISTVER="Enterprise "`cat $f | grep release |\
cut -f 6 -d ' '`
else
DISTVER=`cat /etc/redhat-release | grep release |\
cut -f 5 -d ' '`
fi
# Source function library
. /etc/rc.d/init.d/functions
case "$1" in
start)
rm -f /etc/apcupsd/powerfail
rm -f /etc/nologin
for conf in /etc/apcupsd/apcupsd.*.conf ; do
inst=`basename $conf`
echo -n "Starting UPS monitoring ($inst):"
daemon /sbin/apcupsd -f $conf -P /var/run/apcupsd-$inst.pid
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/apcupsd-$inst
done
;;
stop)
for conf in /etc/apcupsd/apcupsd.*.conf ; do
inst=`basename $conf`
echo -n "Shutting down UPS monitoring ($inst):"
killproc -p /var/run/apcupsd-$inst.pid apcupsd
echo
rm -f /var/run/apcupsd-$inst.pid
rm -f /var/lock/subsys/apcupsd-$inst
done
;;
restart|force-reload)
$0 stop
Page view 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 114 115

Comments to this Manuals

No comments