From 5212d51fc40173b98d63228a20a10fb8b1610dde Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Thu, 25 Oct 2007 19:05:25 +0000 Subject: [PATCH] r16: - replace (root|monit)@localhost into (root|monit)@fqdn - fix typos (pop3 -> pop) in dovecot/qpopper --- debian/changelog | 7 +++++++ debian/postinst | 9 +++++++++ monit-cn/dovecot.conf | 2 +- monit-cn/qpopper.conf | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 93a907f..b074ff3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monit-cn (1:4.8.1-2) stable; urgency=low + + * promijeni (root|monit)@localhost u (root|monit)@fqdn u monitrc + * popravljen typo u dovecot.conf/qpopper.conf + + -- Dinko Korunic Thu, 25 Oct 2007 20:47:13 +0200 + monit-cn (1:4.8.1-1) stable; urgency=low * dodan postgrey servis diff --git a/debian/postinst b/debian/postinst index e665ab6..e5edbbb 100755 --- a/debian/postinst +++ b/debian/postinst @@ -47,6 +47,15 @@ if [ $installfile -eq 1 ]; then chmod u=rw,go= /etc/monit/monitrc fi +# sed monitrc with proper hostname +if grep -q '@localhost' /etc/monit/monitrc; then + CARNET_HOSTNAME=`hostname` + CARNET_DOMAINNAME=`hostname --domain` + cp_check_and_sed '@localhost' \ + "s/@localhost/@$CARNET_HOSTNAME.$CARNET_DOMAINNAME/g" \ + /etc/monit/monitrc || true +fi + # (re)generate monit.d files update-monit.d || true diff --git a/monit-cn/dovecot.conf b/monit-cn/dovecot.conf index 7f7dfb5..3cfdfec 100644 --- a/monit-cn/dovecot.conf +++ b/monit-cn/dovecot.conf @@ -6,5 +6,5 @@ check process dovecot with pidfile "/var/run/dovecot/master.pid" stop program = "/etc/init.d/dovecot stop" if failed host 127.0.0.1 port 143 protocol imap then restart - if failed host 127.0.0.1 port 110 protocol pop3 + if failed host 127.0.0.1 port 110 protocol pop then restart diff --git a/monit-cn/qpopper.conf b/monit-cn/qpopper.conf index 8494c28..1ee0b81 100644 --- a/monit-cn/qpopper.conf +++ b/monit-cn/qpopper.conf @@ -4,5 +4,5 @@ check process qpopper with pidfile "/var/run/popper.pid" group mail start program = "/etc/init.d/qpopper start" stop program = "/etc/init.d/qpopper stop" - if failed host 127.0.0.1 port 110 type pop3 + if failed host 127.0.0.1 port 110 protocol pop then restart -- 1.7.10.4