Advertisement
swaggboi

Untitled

Dec 30th, 2021
1,699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.33 KB | None | 0 0
  1. --- apccontrol.orig 2021-12-26 17:49:33.629171845 -0500
  2. +++ apccontrol  2021-12-30 10:54:51.197863641 -0500
  3. @@ -25,8 +25,8 @@
  4.  SCRIPTDIR=/etc/apcupsd
  5.  WALL=wall
  6.  
  7. -export SYSADMIN=root
  8. -export APCUPSD_MAIL="/bin/mail"
  9. +export SYSADMIN="danielbowling424@msn.com"
  10. +export APCUPSD_MAIL="/bin/mutt"
  11.  if [ -f $SCRIPTDIR/config ]; then . $SCRIPTDIR/config ; fi
  12.  
  13.  #
  14. @@ -43,7 +43,7 @@
  15.  # passed by apcupsd to this script.
  16.  #
  17.  # After executing your script, apccontrol continues with the default action.
  18. -# If you do not want apccontrol to continue, exit your script with exit
  19. +# If you do not want apccontrol to continue, exit your script with exit
  20.  # code 99. E.g. "exit 99".
  21.  #
  22.  # WARNING: the apccontrol file will be overwritten every time you update your
  23. @@ -104,11 +104,13 @@
  24.      ;;
  25.      doreboot)
  26.     echo "UPS ${2} initiating Reboot Sequence" | ${WALL}
  27. -   ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
  28. +   #${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot"
  29. +        /usr/bin/systemctl reboot
  30.      ;;
  31.      doshutdown)
  32.     echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
  33. -   ${SHUTDOWN} -h -H now "apcupsd UPS ${2} initiated shutdown"
  34. +   #${SHUTDOWN} -h -H now "apcupsd UPS ${2} initiated shutdown"
  35. +        /usr/bin/systemctl hibernate
  36.      ;;
  37.      annoyme)
  38.     echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement