#!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later opts="depend checkconfig start stop" myname="dnsproxy" myprog="/usr/sbin/dnsproxy" myconf="/etc/dnsproxy/dnsproxy.conf" depend() { need net } checkconfig() { if [ ! -e ${myconf} ] ; then eerror "You need to create ${myconf} first." eerror "An example can be found in ${myconf}-dist" return 1 fi } start() { ebegin "Starting ${myname}" checkconfig && \ start-stop-daemon --start --make-pidfile \ --quiet -b --pidfile ${PIDFILE} \ --exec ${myprog} -- ${OPTIONS} eend $? } stop() { ebegin "Stopping ${myname}" start-stop-daemon --stop --quiet \ --pidfile ${PIDFILE} \ && rm ${PIDFILE} eend $? }