rc script question
Ion-Mihai Tetcu
itetcu at people.tecnik93.com
Wed Dec 29 14:49:55 PST 2004
Hi,
For the following rc script I have to provide a dspam_flags="--debug" in
which case it shouldn't redirect sterr and stout to the bit-bucket and
it shouldn't go in background. Could someone tell my how to do it ? I'm
circling around for a few hours with no result.
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dspam
# REQUIRE: NETWORKING SERVERS mysql
# BEFORE: LOGIN mail
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
# dspam_enable="YES"
# and dspam_flags="--debug" to keep dspam in forground and have debug msgs
#
. /etc/rc.subr
name=dspam
rcvar=`set_rcvar`
command=/usr/local/bin/${name}
command_args="--daemon 2>&1 &"
pidfile=/var/run/${name}.pid
required_dirs=/var/db/dspam
required_files=/usr/local/etc/${name}.conf
extra_commands=reload
reload()
{
kill -HUP `cat $pidfile`
}
# set defaults
dspam_enable=${dspam_enable:-"NO"}
load_rc_config $name
run_rc_command "$1
Thanks,
--
IOnut
Unregistered ;) FreeBSD "user"
More information about the freebsd-ports
mailing list