You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-proxy/dnsproxy/files/dnsproxy.initd

32 lines
703 B

#!/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 $?
}