summaryrefslogtreecommitdiff
blob: 07f0d2181d986731b30624efc1b3ac8d1457ac0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Id$

extra_started_commands="reload"

pidfile="/var/run/dnsmasq.pid"
command="/usr/sbin/dnsmasq"
command_args="-x ${pidfile} ${DNSMASQ_OPTS}"
start_stop_daemon_args="--retry TERM/3/TERM/5"

depend() {
	provide dns
	need localmount net
	after bootmisc
	use logger
}

start_pre() {
	checkpath --owner dnsmasq:dnsmasq \
		--mode 0644 \
		--file /var/lib/misc/dnsmasq.leases
}

reload() {
	ebegin "Reloading ${RC_SVCNAME}"
	kill -HUP $(cat "${pidfile}")
	eend $?
}