diff options
Diffstat (limited to 'network/ttdnsd/rc.ttdnsd.new')
-rw-r--r-- | network/ttdnsd/rc.ttdnsd.new | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/network/ttdnsd/rc.ttdnsd.new b/network/ttdnsd/rc.ttdnsd.new new file mode 100644 index 0000000000..39c214a983 --- /dev/null +++ b/network/ttdnsd/rc.ttdnsd.new @@ -0,0 +1,57 @@ +#! /bin/sh +# +# ttdnsd The Tor TCP DNS Daemon +# +# This initscript runs a chrooted ttdnsd process and it makes recursive TCP +# DNS requests through the Tor network. + +# This script is a modified version of Jacob Appelbaum's /etc/init.d/ttdnsd +# for use on Slackware. + +# Author: Marco Bonetti <sid77@slackware.it> + +# Do NOT "set -e" + +NAME=ttdnsd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/ttdnsd.pid +TSOCKS_CONF_FILE=tsocks.conf +export TSOCKS_CONF_FILE + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# This will be overloaded by $DEFAULTS +DAEMON_ARGS="-P $PIDFILE -f /etc/ttdnsd.conf $DEFAULTS" + +start() { + $DAEMON $DAEMON_ARGS +} + +stop() { + kill `cat $PIDFILE` +} + +reload() { + kill -s HUP `cat $PIDFILE` +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + reload) + reload + ;; + restart|force-reload) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 (start|stop|reload|restart|force-reload)" + ;; +esac |