From 1a6944c221294202ee0b5e89c2d9f4dc6fdbcc5e Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Mon, 14 Apr 2008 22:48:00 +0200 Subject: [PATCH] - pametniji restart Postfixa u slucaju promjena u konfiguraciji Signed-off-by: Dinko Korunic --- src/postfix.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/postfix.sh b/src/postfix.sh index 1d74552..7aa3961 100755 --- a/src/postfix.sh +++ b/src/postfix.sh @@ -5,10 +5,14 @@ update_postfix() { dpkg --compare-versions "$2" lt $MASTTMPLVERSION ); then noisy_backup /etc/postfix/master.cf cp-update $PKG /etc/postfix/master.cf < $MASTTMPL + restart_mta=1 fi # main.cf - postconf -e content_filter="smtp-amavis:[127.0.0.1]:10024" - - restart_mta=1 + if [ ! -f /etc/postfix/main.cf ] || \ + ! grep -q "smtp-amavis:[127.0.0.1]:10024" \ + /etc/postfix/main.cf; then + postconf -e content_filter="smtp-amavis:[127.0.0.1]:10024" + restart_mta=1 + fi } -- 1.7.10.4