mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Update rc.d script to add a configtest command to test configuration
before starting/restarting service. PR: 197587 Submitted by: elbarto at megadrive.org
This commit is contained in:
parent
c457b1ffbf
commit
1b75f6827a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378921
2 changed files with 17 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= opensmtpd
|
||||
PORTVERSION= 201502012312
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.opensmtpd.org/archives/ \
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue