Date: Fri, 13 Feb 2015 11:52:23 +0000 (UTC) From: Ashish SHUKLA <ashish@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r378922 - in head/mail/opensmtpd: . files Message-ID: <201502131152.t1DBqN2H027463@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502131152.t1DBqN2H027463>