Date: Mon, 25 Sep 2006 10:51:52 -0600 (MDT) From: Brad Davis <brd@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/103626: [patch] Update the net/smokeping rc script to something somewhat current Message-ID: <20060925165152.BAE2A2E02B@ender.liquidneon.com> Resent-Message-ID: <200609251700.k8PH0aGA028436@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 103626 >Category: ports >Synopsis: [patch] Update the net/smokeping rc script to something somewhat current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Sep 25 17:00:35 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Brad Davis >Release: FreeBSD 6.1-STABLE i386 >Organization: >Environment: System: FreeBSD ender.liquidneon.com 6.1-STABLE FreeBSD 6.1-STABLE #0: Sat Jul 22 22:08:18 MDT 2006 root@ender.liquidneon.com:/usr/obj/usr/src/sys/ENDER i386 >Description: This patch updates smokeping's rc script to something somewhat current. >How-To-Repeat: >Fix: --- smokeping.sh.org Fri Sep 22 17:09:33 2006 +++ smokeping.sh.new Fri Sep 22 19:50:35 2006 @@ -1,29 +1,30 @@ #!/bin/sh +# $FreeBSD: $ -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - [ -r ${PREFIX}/etc/smokeping/config ] && \ - su -f -m smokeping -c ${PREFIX}/bin/smokeping > /dev/null && \ - echo -n ' smokeping' - ;; -restart) - [ -r ${PREFIX}/etc/smokeping/config ] && \ - su -f -m smokeping -c "${PREFIX}/bin/smokeping --restart" > /dev/null && \ - echo -n ' smokeping' - ;; -stop) - [ -r ${PREFIX}/var/smokeping/smokeping.pid ] && \ - su -f -m smokeping -c "kill `cat ${PREFIX}/var/smokeping/smokeping.pid`" > /dev/null && \ - echo -n ' smokeping' - ;; -*) - echo "Usage: `basename $0` {start|restart|stop}" >&2 - ;; -esac +# PROVIDE: smokeping +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown -exit 0 +# Define these smokeping_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/smokeping +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +smokeping_enable=${smokeping_enable-"NO"} +smokeping_flags=${smokeping_flags-""} +smokeping_pidfile=${smokeping_pidfile-"/usr/local/var/smokeping/smokeping.pid"} + +. /etc/rc.subr + +name="smokeping" +rcvar=`set_rcvar` +command="/usr/local/bin/smokeping" + +load_rc_config $name + +pidfile="${smokeping_pidfile}" + +run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060925165152.BAE2A2E02B>