Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > bf76d5c1b0f6614649a834aeaf0ba3d4 > files > 2

dnsproxy-1.16-1mdv2010.1.src.rpm

#!/bin/sh
#
# dnsproxy	This shell script takes care of starting and stopping dnsproxy.
#
# chkconfig: 345 56 44
# description: The dnsproxy daemon is a proxy for DNS queries.
# probe: false
# processname: dnsproxy
# config: /etc/dnsproxy.conf

# Source function library.
. /etc/rc.d/init.d/functions

[ -f /etc/dnsproxy.conf ] || exit 0

# See how we were called.
case "$1" in
start)
	echo -n "Starting dnsproxy: "
	dnsproxy -c /etc/dnsproxy.conf -d
	echo
	touch /var/lock/subsys/dnsproxy
	;;
stop)
	echo -n "Stopping dnsproxy: "
	killall dnsproxy
	echo
	rm -f /var/lock/subsys/dnsproxy
	;;
status)
	echo -n "dnsproxy status: "
	status dnsproxy
	;;
restart|reload)
	$0 stop
	$0 start
	;;
condrestart)
	[ -f /var/lock/subsys/dnsproxy ] && restart
	;;
  *)
	echo "Usage: dnsproxy {start|stop|status|restart|condrestart|reload}"
	exit 1
esac

exit 0