blob: 000fc95eaa2b8fb7f25e5fe7f10f3f7dd5a5c4a8 (
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
31
|
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
checkconfig() {
if [ ! -e "${DNSPROXY_CONFFILE}" ] ; then
eerror "You need to create and select the configuration file first."
eerror "An example can be found in /etc/dnsproxy/dnsproxy.conf.dist"
return 1
fi
}
start() {
ebegin "Starting dnsproxy"
checkconfig && \
start-stop-daemon --start --make-pidfile \
--quiet -b --pidfile ${DNSPROXY_PIDFILE} \
--exec /usr/sbin/dnsproxy -- -c "${DNSPROXY_CONFFILE}"
eend $?
}
stop() {
ebegin "Stopping dnsproxy"
start-stop-daemon --stop --quiet \
--pidfile ${DNSPROXY_PIDFILE}
eend $?
}
|