Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
--- apccontrol.orig 2021-12-26 17:49:33.629171845 -0500 +++ apccontrol 2021-12-30 10:54:51.197863641 -0500 @@ -25,8 +25,8 @@ SCRIPTDIR=/etc/apcupsd WALL=wall -export SYSADMIN=root -export APCUPSD_MAIL="/bin/mail" +export SYSADMIN="danielbowling424@msn.com" +export APCUPSD_MAIL="/bin/mutt" if [ -f $SCRIPTDIR/config ]; then . $SCRIPTDIR/config ; fi # @@ -43,7 +43,7 @@ # passed by apcupsd to this script. # # After executing your script, apccontrol continues with the default action. -# If you do not want apccontrol to continue, exit your script with exit +# If you do not want apccontrol to continue, exit your script with exit # code 99. E.g. "exit 99". # # WARNING: the apccontrol file will be overwritten every time you update your @@ -104,11 +104,13 @@ ;; doreboot) echo "UPS ${2} initiating Reboot Sequence" | ${WALL} - ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" + #${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" + /usr/bin/systemctl reboot ;; doshutdown) echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} - ${SHUTDOWN} -h -H now "apcupsd UPS ${2} initiated shutdown" + #${SHUTDOWN} -h -H now "apcupsd UPS ${2} initiated shutdown" + /usr/bin/systemctl hibernate ;; annoyme) echo "Power problems with UPS ${2}. Please logoff." | ${WALL}
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)