mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
Allow to configure mail notification host
This commit is contained in:
parent
ae68f8f8e8
commit
e966207aec
1 changed files with 9 additions and 5 deletions
|
@ -33,7 +33,11 @@ if ! grep -Eq "^notifyMailTo=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -Eq "^notifyMailServer=.*" /mnt/hdd/raspiblitz.conf; then
|
if ! grep -Eq "^notifyMailServer=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
echo "notifyMailServer=mail@example.com" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
echo "notifyMailServer=mail.example.com" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -Eq "^notifyMailHostname=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
|
echo "notifyMailHostname=$(hostname)" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -Eq "^notifyMailUser=.*" /mnt/hdd/raspiblitz.conf; then
|
if ! grep -Eq "^notifyMailUser=.*" /mnt/hdd/raspiblitz.conf; then
|
||||||
|
@ -81,13 +85,13 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
#
|
#
|
||||||
# The person who gets all mail for userids < 1000
|
# The person who gets all mail for userids < 1000
|
||||||
# Make this empty to disable rewriting.
|
# Make this empty to disable rewriting.
|
||||||
root=${notifyMailTo}
|
Root=${notifyMailTo}
|
||||||
|
|
||||||
# hostname of this system
|
# hostname of this system
|
||||||
hostname=${hostname}
|
Hostname=${notifyMailHostname}
|
||||||
|
|
||||||
# relay/smarthost server settings
|
# relay/smarthost server settings
|
||||||
mailhub=${notifyMailServer}
|
Mailhub=${notifyMailServer}
|
||||||
AuthUser=${notifyMailUser}
|
AuthUser=${notifyMailUser}
|
||||||
AuthPass=${notifyMailPass}
|
AuthPass=${notifyMailPass}
|
||||||
UseSTARTTLS=YES
|
UseSTARTTLS=YES
|
||||||
|
@ -141,7 +145,7 @@ if [ "$1" = "send" ]; then
|
||||||
elif [ "${notifyMethod}" = "slack" ]; then
|
elif [ "${notifyMethod}" = "slack" ]; then
|
||||||
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py slack -h "$2"
|
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py slack -h "$2"
|
||||||
else
|
else
|
||||||
echo "unknown notification method - check /mnt/hdd/raspiblitz.con"
|
echo "unknown notification method - check /mnt/hdd/raspiblitz.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue