aboutsummaryrefslogtreecommitdiffstats
path: root/mail/opensmtpd-devel
diff options
context:
space:
mode:
Diffstat (limited to 'mail/opensmtpd-devel')
-rw-r--r--mail/opensmtpd-devel/Makefile1
-rw-r--r--mail/opensmtpd-devel/files/smtpd.in16
2 files changed, 17 insertions, 0 deletions
diff --git a/mail/opensmtpd-devel/Makefile b/mail/opensmtpd-devel/Makefile
index 51f0b688bf19..843edddff382 100644
--- a/mail/opensmtpd-devel/Makefile
+++ b/mail/opensmtpd-devel/Makefile
@@ -3,6 +3,7 @@
PORTNAME= opensmtpd
PORTVERSION= 201502012312
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://www.opensmtpd.org/archives/ \
diff --git a/mail/opensmtpd-devel/files/smtpd.in b/mail/opensmtpd-devel/files/smtpd.in
index 0cbe28ecc352..e887f7d6c170 100644
--- a/mail/opensmtpd-devel/files/smtpd.in
+++ b/mail/opensmtpd-devel/files/smtpd.in
@@ -26,6 +26,11 @@ check_process()
name="smtpd"
rcvar=smtpd_enable
+start_precmd="smtpd_precmd"
+restart_precmd="smtpd_checkconfig"
+configtest_cmd="smtpd_checkconfig"
+extra_commands="configtest"
+
load_rc_config $name
: ${smtpd_enable:="NO"}
@@ -37,4 +42,15 @@ command=${smtpd_procname}
procname=${smtpd_procname}
+smtpd_checkconfig()
+{
+ echo "Performing sanity check on smtpd configuration:"
+ eval ${command} ${smtpd_flags} -n
+}
+
+smtpd_precmd()
+{
+ smtpd_checkconfig
+}
+
run_rc_command "$1"