#!/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