diff options
author | ashish <ashish@FreeBSD.org> | 2015-02-13 19:51:06 +0800 |
---|---|---|
committer | ashish <ashish@FreeBSD.org> | 2015-02-13 19:51:06 +0800 |
commit | 0d9e64fc0c39d18e0c6730c4b2b6937d2254a6a2 (patch) | |
tree | 46a6026024246261b925c4879a2fa71e342ab951 /mail/opensmtpd-devel | |
parent | 10e90a067b5fad8a3164450ed1db3c8b11be6086 (diff) | |
download | freebsd-ports-gnome-0d9e64fc0c39d18e0c6730c4b2b6937d2254a6a2.tar.gz freebsd-ports-gnome-0d9e64fc0c39d18e0c6730c4b2b6937d2254a6a2.tar.zst freebsd-ports-gnome-0d9e64fc0c39d18e0c6730c4b2b6937d2254a6a2.zip |
- Update rc.d script to add a configtest command to test configuration
before starting/restarting service.
PR: 197587
Submitted by: elbarto at megadrive.org
Diffstat (limited to 'mail/opensmtpd-devel')
-rw-r--r-- | mail/opensmtpd-devel/Makefile | 1 | ||||
-rw-r--r-- | mail/opensmtpd-devel/files/smtpd.in | 16 |
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" |