#!/sbin/runscript # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ CHINADNS_CHNROUTE="/usr/share/chnroute.txt" depend() { use net before dns after logger } start() { ebegin "Starting ChinaDNS" start-stop-daemon --start --name chinadns \ --pidfile /var/run/chinadns.pid --make-pid \ --exec /usr/bin/chinadns \ -- \ -b ${CHINADNS_LOCALIP} \ -p ${CHINADNS_LOCALPORT} \ -s ${CHINADNS_DNSSERVER} \ -c ${CHINADNS_CHNROUTE} \ -v > /var/log/chinadns.log 2>&1 & eend $? } stop() { ebegin "Stopping ChinaDNS" start-stop-daemon --stop --name chinadns --pidfile /var/run/chinadns.pid eend $? }