summaryrefslogtreecommitdiff
blob: 38a684425768d4c58d1269bf060905e7921373b2 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init,v 1.7 2006/01/08 01:39:02 avenj Exp $

opts="${opts} reload"

depend() {
	provide dns
	need net
}

start() {
	ebegin "Starting dnsmasq"
	/usr/sbin/dnsmasq -x /var/run/dnsmasq.pid ${DNSMASQ_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping dnsmasq"
	start-stop-daemon --stop --quiet --pidfile /var/run/dnsmasq.pid
	eend $?
}

reload() {
	ebegin "Reloading dnsmasq"
	start-stop-daemon --stop -s HUP -p /var/run/dnsmasq.pid
	eend $?
}