--- etc/rc.subr +++ etc/rc.subr @@ -340,12 +340,12 @@ _find_processes() _interpbn=${1##*/} _fp_args='_argv' _fp_match='case "$_argv" in - ${_interp}|"${_interp} "*|"[${_interpbn}]"|"${_interpbn}: ${_procname}"*)' + ${_interp}|"${_interp} "*|"[${_interpbn}]"|"${_interpbn}: ${_procname}"*${extra_process_match:+|${extra_process_match}})' else # a normal daemon _procnamebn=${_procname##*/} _fp_args='_arg0 _argv' _fp_match='case "$_arg0" in - $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' + $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]"${extra_process_match:+|${extra_process_match}})' fi _proccheck="\ @@ -729,6 +729,12 @@ check_startmsgs() # # extra_commands n List of extra commands supported. # +# extra_process_match n A glob used to match the daemon's process, used +# in _find_processes to see if daemon is still +# running. +# Use if the daemon use setproctitle and the +# default globs cannot find the process. +# # pidfile n If set, use check_pidfile $pidfile $command, # otherwise use check_process $command. # In either case, only check if $command is set.