Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 039193326a3717dc9e9cf30139d249aa > files > 2

dnsproxy-1.15-4mdv2008.1.x86_64.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)
	gprintf "Starting dnsproxy: "
	dnsproxy -c /etc/dnsproxy.conf -d
	echo
	touch /var/lock/subsys/dnsproxy
	;;
stop)
	gprintf "Stopping dnsproxy: "
	killall dnsproxy
	echo
	rm -f /var/lock/subsys/dnsproxy
	;;
status)
	gprintf "dnsproxy status: "
	status dnsproxy
	;;
restart|reload)
	$0 stop
	$0 start
	;;
condrestart)
	[ -f /var/lock/subsys/dnsproxy ] && restart
	;;
  *)
	gprintf "Usage: dnsproxy {start|stop|status|restart|condrestart|reload}\n"
	exit 1
esac

exit 0