nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #01071
[Merge] ~peppepetra86/charm-nagios:lp1888207 into charm-nagios:master
Giuseppe Petralia has proposed merging ~peppepetra86/charm-nagios:lp1888207 into charm-nagios:master.
Requested reviews:
Nagios Charm developers (nagios-charmers)
Related bugs:
Bug #1888207 in Nagios Charm: "Nagios installation goes to error state in trusty"
https://bugs.launchpad.net/charm-nagios/+bug/1888207
For more details, see:
https://code.launchpad.net/~peppepetra86/charm-nagios/+git/charm-nagios/+merge/387651
--
Your team Nagios Charm developers is requested to review the proposed merge of ~peppepetra86/charm-nagios:lp1888207 into charm-nagios:master.
diff --git a/scripts/postfix_loopback_only.sh b/scripts/postfix_loopback_only.sh
index 77c388c..ae5066b 100755
--- a/scripts/postfix_loopback_only.sh
+++ b/scripts/postfix_loopback_only.sh
@@ -1,7 +1,11 @@
#!/bin/sh
POSTFIX_CONF="/etc/postfix/main.cf"
+CODENAME="$(lsb_release -a | grep -E '^Codename:' | awk '{print $2}')"
+if [ $CODENAME = "trusty" ] ; then CMD="/etc/init.d/postfix restart" ; else CMD="systemctl restart postfix" ; fi
+
if grep -qE '^inet_interfaces.*all' $POSTFIX_CONF; then
sed -i 's/^inet_interfaces.*/inet_interfaces = loopback-only/' $POSTFIX_CONF
- systemctl restart postfix
+ $CMD
fi
+
Follow ups