[BACK]Return to isc-dhcpd.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / net / isc-dhcpd4 / files / smf

File: [cvs.NetBSD.org] / pkgsrc / net / isc-dhcpd4 / files / smf / isc-dhcpd.sh (download)

Revision 1.1, Wed Mar 12 14:29:31 2014 UTC (6 years, 8 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, HEAD

Add SMF support.

#!@SMF_METHOD_SHELL@
#
# $NetBSD: isc-dhcpd.sh,v 1.1 2014/03/12 14:29:31 jperkin Exp $
#
# Init script for isc-dhcpd.
#

case "$1" in
start)
	if [ ! -d @DHCP_HOME@ ]; then
		mkdir -p @DHCP_HOME@
		touch @DHCP_HOME@/dhcpd.leases
		chmod 0640 @DHCP_HOME@/dhcpd.leases
	fi
	mkdir -p @DHCP_PID@
	chmod 0770 @DHCP_PID@
	@PREFIX@/sbin/dhcpd
	;;
stop)
	if [ -s @DHCP_PID@/isc-dhcpd.pid ]; then
		kill `cat @DHCP_PID@/isc-dhcpd.pid`
	fi
	;;
refresh)
	$0 stop
	$0 start
	;;
esac