37 lines
792 B
Bash
37 lines
792 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
CFG="/etc/pve/notifications.cfg"
|
|
BACKUP="/etc/pve/notifications.cfg.bak.$(date +%Y%m%d%H%M%S)"
|
|
|
|
cp "$CFG" "$BACKUP"
|
|
echo "Backup erstellt: $BACKUP"
|
|
|
|
cat > "$CFG" << 'EOF'
|
|
sendmail: mail-to-root
|
|
comment Send mails to root@pam's email address
|
|
disable false
|
|
mailto-user root@pam
|
|
|
|
smtp: mailout
|
|
author MH-PVE02 | MAIERHOME H33
|
|
from-address MH-PVE02@vmd55888.de
|
|
mailto pbs-dashboard@mail.vmd55888.de
|
|
mailto-user root@pam
|
|
mode starttls
|
|
port 587
|
|
server mail.vmd55888.de
|
|
username mailout
|
|
|
|
matcher: default-matcher
|
|
comment Route all notifications to mail-to-root
|
|
mode all
|
|
target mail-to-root
|
|
|
|
policy: default
|
|
sender mailout
|
|
targets mail-to-root
|
|
EOF
|
|
|
|
echo "Config geschrieben. Passwort bitte manuell in WebUI setzen."
|