I've got a shell script I'd like to run as a system service. Due to the
16 character limitation on pgrep and the -x flag that rc.subr passes to
check by default, I can't get check or stop to work correctly. The
problem is that the process name looks like "/bin/sh
/usr/local/bin/script.sh" which, even if passed to pgrep, won't match
when -x is used.

My rc.d script currently looks like this:

#!/bin/ksh

AUTHMAIL="/usr/local/bin/authmail"
daemon=${AUTHMAIL}
daemon_timeout=1

. /etc/rc.d/rc.subr

rc_reload=NO
rc_bg=YES
pexp="/bin/sh ${AUTHMAIL}"

rc_cmd $1

Do I have any other options, or do I just need to override rc_check to
remove -x?


Reply via email to