aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2016-02-25 20:14:40 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2016-02-25 20:14:40 +0000
commitd15a2cc7cc1f5f3c91679fb29256f1eb95aa34db (patch)
tree7483d1735c3bfb391e9155f1a398ea4d85fa6dda /mail/postfix
parentc6a9267b5c26229828b5a522820d288749c7dd49 (diff)
Notes
Diffstat (limited to 'mail/postfix')
-rw-r--r--mail/postfix/files/pkg-install.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/mail/postfix/files/pkg-install.in b/mail/postfix/files/pkg-install.in
index 62733280ef9f..73f621e3c934 100644
--- a/mail/postfix/files/pkg-install.in
+++ b/mail/postfix/files/pkg-install.in
@@ -130,6 +130,20 @@ install_mailer_conf() {
}
# ==============================================================================
+# Run postfix reload
+# This is a candidate for a dedicated pkg-post-upgrade script, but it seems
+# this not fully implemented in pkg :(see upstream PR 941)
+# ==============================================================================
+try_reload(){
+ ${PREFIX}/sbin/postfix status 2>/dev/null
+if [ $? -eq 0 ]; then
+ ${PREFIX}/sbin/postfix reload
+else
+ echo "postfix not running"
+fi
+}
+
+# ==============================================================================
# Run postfix post-install to fix permissions and new config values
# ==============================================================================
if [ "$2" = "POST-INSTALL" ]; then
@@ -152,6 +166,7 @@ if [ -f "${MC_BASE}" ]; then
if [ $? -eq 0 ]; then
show_activated_msg ${MC_BASE}
cmp_mailer ${MC_LOCALBASE} || install_mailer_conf ${MC_LOCALBASE}
+ try_reload
else
cmp_mailer ${MC_LOCALBASE} || install_choise ${MC_LOCALBASE}
fi
@@ -161,6 +176,7 @@ if [ -f "${MC_BASE}" ]; then
install_choise ${MC_BASE}
else
show_activated_msg ${MC_BASE}
+ try_reload
fi
fi