summaryrefslogtreecommitdiff
path: root/network/ttdnsd/rc.ttdnsd.new
diff options
context:
space:
mode:
authorMarco Bonetti <sid77@slackware.it>2010-08-24 00:24:11 -0400
committerErik Hanson <erik@slackbuilds.org>2010-08-29 15:32:12 -0500
commit6b3dcddbf803c1f7dbbd7b821b559274cd421321 (patch)
tree9e32cceb06ce48bdd454a7a69d485835fe54ea3a /network/ttdnsd/rc.ttdnsd.new
parent32376e2b76b9415697b832cf686ecb9b0b3b49fd (diff)
downloadslackbuilds-6b3dcddbf803c1f7dbbd7b821b559274cd421321.tar.gz
network/ttdnsd: Added (The Tor TCP DNS Daemon)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/ttdnsd/rc.ttdnsd.new')
-rw-r--r--network/ttdnsd/rc.ttdnsd.new57
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