From 41e3d18ba02e2ff80b73d40ec3898b5a055ca50c Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Wed, 13 Dec 2000 08:26:16 +0000 Subject: Add sample RC startup script. Submitted by: Jun Kuriyama (w/changes by me) --- net/isc-dhcp3/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 net/isc-dhcp3/files/isc-dhcpd.sh.sample (limited to 'net/isc-dhcp3/files/isc-dhcpd.sh.sample') diff --git a/net/isc-dhcp3/files/isc-dhcpd.sh.sample b/net/isc-dhcp3/files/isc-dhcpd.sh.sample new file mode 100644 index 000000000000..f07d745c3772 --- /dev/null +++ b/net/isc-dhcp3/files/isc-dhcpd.sh.sample @@ -0,0 +1,31 @@ +#! /bin/sh + +# $FreeBSD$ + +IFACES="SET_THIS" + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +case "$1" in +start) + ${PREFIX}/sbin/dhcpd $IFACES + ;; +stop) + kill `cat /var/run/dhcpd.pid` + ;; +restart) + $0 stop + $0 start + ;; +status) + ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)" + ;; +*) + echo "Usage: `basename $0` {start|stop|restart|status}" >&2 + ;; +esac + +exit 0 -- cgit v1.2.3