Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 1997 00:15:05 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        i.vaudrey@cableinet.co.uk (Ian Vaudrey)
Cc:        freebsd-ports@FreeBSD.ORG ('FreeBSD-ports')
Subject:   Re: rc.shutdown
Message-ID:  <19971008001505.VV32226@uriah.heep.sax.de>
In-Reply-To: <01BCD31D.0BA36060@nemkoltd.nildram.co.uk>; from Ian Vaudrey on Oct 7, 1997 12:30:57 %2B0100
References:  <01BCD31D.0BA36060@nemkoltd.nildram.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
As Ian Vaudrey wrote:

> Does anyone have a sample/skeleton script that respects `start'
> and `stop' arguments that they don't mind sharing?

case "$1" in

start)
	code to start something
	echo -n "mydaemon "
	;;

stop)
	pid=$(cat /var/run/mypidfile)
	echo -n "mydaemon "
	kill "$pid"
	;;

*)
	echo "usage: $0 {start|stop}" 1>&2
	exit 64
	;;

esac

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971008001505.VV32226>