svn commit: r378922 - in head/mail/opensmtpd: . files
Ashish SHUKLA
ashish at FreeBSD.org
Fri Feb 13 11:52:23 UTC 2015
Author: ashish
Date: Fri Feb 13 11:52:22 2015
New Revision: 378922
URL: https://svnweb.freebsd.org/changeset/ports/378922
QAT: https://qat.redports.org/buildarchive/r378922/
Log:
- Update rc.d script to add a configtest command to test configuration
before starting/restarting service.
PR: 197587
Submitted by: elbarto at megadrive.org
Modified:
head/mail/opensmtpd/Makefile
head/mail/opensmtpd/files/smtpd.in
Modified: head/mail/opensmtpd/Makefile
==============================================================================
--- head/mail/opensmtpd/Makefile Fri Feb 13 11:51:06 2015 (r378921)
+++ head/mail/opensmtpd/Makefile Fri Feb 13 11:52:22 2015 (r378922)
@@ -3,6 +3,7 @@
PORTNAME= opensmtpd
PORTVERSION= 5.4.4
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail
MASTER_SITES= http://www.opensmtpd.org/archives/ \
Modified: head/mail/opensmtpd/files/smtpd.in
==============================================================================
--- head/mail/opensmtpd/files/smtpd.in Fri Feb 13 11:51:06 2015 (r378921)
+++ head/mail/opensmtpd/files/smtpd.in Fri Feb 13 11:52:22 2015 (r378922)
@@ -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"
More information about the svn-ports-all
mailing list