Path: blob/main/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh
16151 views
--- contrib/dnscheck-dispatcher.sh.orig 2010-06-29 02:15:59.000000000 -07001+++ contrib/dnscheck-dispatcher.sh 2012-01-15 15:32:16.000000000 -08002@@ -6,45 +6,18 @@34# Add the following lines to /etc/rc.conf to enable the dnscheck-dispatcher daemon:5#6-#dnscheck_dispatcher_enable="YES"7-8-#9-# DO NOT CHANGE THESE DEFAULT VALUES HERE10-# SET THEM IN THE /etc/rc.conf FILE11-#12-utility_enable=${dnscheck_dispatcher_enable-"NO"}13-utility_flags=${dnscheck_dispatcher_flags-""}14-utility_pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"}15+# dnscheck_dispatcher_enable="YES"1617. /etc/rc.subr1819name="dnscheck_dispatcher"20-rcvar=`set_rcvar`21-command="/usr/local/bin/dnscheck-dispatcher"22+rcvar=dnscheck_dispatcher_enable2324-pidfile="${utility_pidfile}"25+load_rc_config $name2627-start_cmd=dnscheck_dispatcher_start28-stop_cmd=dnscheck_dispatcher_stop29-status_cmd=dnscheck_dispatcher_status30-31-dnscheck_dispatcher_start() {32- /bin/echo "Starting ${name}." && \33- /usr/bin/nice -5 ${command} ${utility_flags} ${command_args}34-}35-36-37-dnscheck_dispatcher_stop() {38- /bin/echo "Stopping ${name}." && \39- /bin/kill -9 `cat ${utility_pidfile}` && /bin/rm ${utility_pidfile}40-}41-42-dnscheck_dispatcher_status() {43- if [ -e $utility_pidfile ]44- then echo "dnscheck_dispatcher is running as pid `cat ${utility_pidfile}`."45- else echo "dnscheck_dispatcher is not running."46- fi47-}48+dnscheck_dispatcher_enable=${dnscheck_dispatcher_enable-"NO"}49+pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"}50+51+command="%%PREFIX%%/bin/dnscheck-dispatcher"5253-load_rc_config $name54run_rc_command "$1"555657