ff
This commit is contained in:
parent
42ede01c42
commit
945d883cb6
1 changed files with 27 additions and 25 deletions
|
@ -55,31 +55,33 @@
|
|||
|
||||
# TODO mail config? wie senden?
|
||||
# COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf
|
||||
# configure mail notification
|
||||
if [[ -n "$MAILCONTACT" && -n "$MAILSERVER" && -n "$MAILPORT" && -n "$MAILUSER" && -n "$MAILPASSWORD" && -n "$MAILDOMAIN" ]] ; then
|
||||
MAILCONTACT=${MAILCONTACT:="contact@domain.test"}
|
||||
sed -i "s/mailcontact/$MAILCONTACT/g" /etc/ssmtp/ssmtp.conf
|
||||
sed -i "s/mailcontact/$MAILCONTACT/g" /etc/munin/munin-conf.d/munin_mail.conf
|
||||
MAILSERVER=${MAILSERVER:="mail.domain.test"}
|
||||
sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/ssmtp.conf
|
||||
sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/revaliases
|
||||
MAILPORT=${MAILPORT:="25"}
|
||||
sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/ssmtp.conf
|
||||
sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/revaliases
|
||||
MAILUSER=${MAILUSER:="alert@domain.test"}
|
||||
sed -i "s/mailuser/$MAILUSER/g" /etc/ssmtp/ssmtp.conf
|
||||
MAILFROM=${MAILFROM:="munin@domain.test"}
|
||||
sed -i "s/mailfrom/$MAILFROM/g" /etc/ssmtp/revaliases
|
||||
MAILPASSWORD=${MAILPASSWORD:="XXXXXXXXX"}
|
||||
sed -i "s/mailpassword/$MAILPASSWORD/g" /etc/ssmtp/ssmtp.conf
|
||||
MAILDOMAIN=${MAILDOMAIN:="domain.test"}
|
||||
sed -i "s/maildomain/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
||||
sed -i "s/mailhost/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
||||
MAILNAME=${MAILNAME:="Munin"}
|
||||
sed -i "s/munin application user/$MAILNAME/g" /etc/passwd
|
||||
else
|
||||
rm /etc/munin/munin-conf.d/munin_mail.conf /etc/ssmtp/ssmtp.conf
|
||||
fi
|
||||
|
||||
|
||||
# # configure mail notification
|
||||
# if [[ -n "$MAILCONTACT" && -n "$MAILSERVER" && -n "$MAILPORT" && -n "$MAILUSER" && -n "$MAILPASSWORD" && -n "$MAILDOMAIN" ]] ; then
|
||||
# MAILCONTACT=${MAILCONTACT:="contact@domain.test"}
|
||||
# sed -i "s/mailcontact/$MAILCONTACT/g" /etc/ssmtp/ssmtp.conf
|
||||
# sed -i "s/mailcontact/$MAILCONTACT/g" /etc/munin/munin-conf.d/munin_mail.conf
|
||||
# MAILSERVER=${MAILSERVER:="mail.domain.test"}
|
||||
# sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/ssmtp.conf
|
||||
# sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/revaliases
|
||||
# MAILPORT=${MAILPORT:="25"}
|
||||
# sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/ssmtp.conf
|
||||
# sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/revaliases
|
||||
# MAILUSER=${MAILUSER:="alert@domain.test"}
|
||||
# sed -i "s/mailuser/$MAILUSER/g" /etc/ssmtp/ssmtp.conf
|
||||
# MAILFROM=${MAILFROM:="munin@domain.test"}
|
||||
# sed -i "s/mailfrom/$MAILFROM/g" /etc/ssmtp/revaliases
|
||||
# MAILPASSWORD=${MAILPASSWORD:="XXXXXXXXX"}
|
||||
# sed -i "s/mailpassword/$MAILPASSWORD/g" /etc/ssmtp/ssmtp.conf
|
||||
# MAILDOMAIN=${MAILDOMAIN:="domain.test"}
|
||||
# sed -i "s/maildomain/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
||||
# sed -i "s/mailhost/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
||||
# MAILNAME=${MAILNAME:="Munin"}
|
||||
# sed -i "s/munin application user/$MAILNAME/g" /etc/passwd
|
||||
# else
|
||||
# rm /etc/munin/munin-conf.d/munin_mail.conf /etc/ssmtp/ssmtp.conf
|
||||
# fi
|
||||
|
||||
# cronjoib? timer? TODO
|
||||
|
||||
|
|
Loading…
Reference in a new issue