mirror of
https://github.com/mr-vercetti/homeserver.git
synced 2025-12-15 12:35:44 +01:00
Add pwrstatd config and scripts
This commit is contained in:
14
pwrstatd/pwrstatd-powerfail.sh
Executable file
14
pwrstatd/pwrstatd-powerfail.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo "Warning: Utility power failure has occurred for a while, system is now powered by UPS" | wall
|
||||
|
||||
# Enable to send email
|
||||
enable_email="yes"
|
||||
|
||||
# Send email using "/etc/sg-send-mail.sh" script
|
||||
email_from=""
|
||||
email_to=""
|
||||
email_sender=""
|
||||
|
||||
if [[ $enable_email == "yes" ]]; then
|
||||
/etc/sg-send-email.sh -f ${email_from} -n ${email_sender} -t ${email_to} -s "Power failure on hustler'" -m "$(date)"
|
||||
fi
|
||||
Reference in New Issue
Block a user