1#!/bin/sh
2# Contributed by Brian Murrell
3
4state=$1
5
6set `who -r`
7case $state in
8
9'start')
10	if [ $9 = "2" -o $9 = "3" ]
11	then
12		exit
13	fi
14	if [ -f @PREFIX@/sbin/dhcpd ]; then
15		echo "Starting the ISC DHCP server"
16		@PREFIX@/sbin/dhcpd
17	fi
18	;;
19'stop')
20	if [ -f @PREFIX@/etc/dhcpd.pid ]; then
21		PID=`cat @PREFIX@/etc/dhcpd.pid`
22		if [ -d /proc/$PID ]; then
23			echo "Stopping the ISC DHCP server"
24			kill $PID
25		fi
26	fi
27	;;
28esac
29