You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
442 B

  1. #!/bin/sh
  2. #
  3. # This shell script if placed in /etc/apcupsd
  4. # will be called by /etc/apcupsd/apccontrol when apcupsd
  5. # restores contact with the UPS (i.e. the serial connection is restored).
  6. # We send an email message to root to notify him.
  7. #
  8. . /etc/apcupsd/apcupsd_mail.conf
  9. MSG="$HOSTNAME Communications with UPS restored"
  10. #
  11. (
  12. echo "$MSG"
  13. echo " "
  14. /usr/sbin/apcaccess status
  15. ) | $MAILPROG -h $MAILHOST -f $FROM -s "$MSG" $TO
  16. exit 0