Date: Thu, 30 Dec 2004 00:50:39 +0200 From: Ion-Mihai Tetcu <itetcu@people.tecnik93.com> To: ports@FreeBSD.ORG Subject: rc script question Message-ID: <20041230005039.3363683f@it.buh.cameradicommercio.ro>
next in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041230005039.3363683f>