summaryrefslogtreecommitdiff
path: root/tor/tor.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tor/tor.rc')
-rw-r--r--tor/tor.rc47
1 files changed, 0 insertions, 47 deletions
diff --git a/tor/tor.rc b/tor/tor.rc
deleted file mode 100644
index 62a59cf..0000000
--- a/tor/tor.rc
+++ /dev/null
@@ -1,47 +0,0 @@
1#!/bin/sh
2#
3# /etc/rc.d/tor: start/stop tor daemon
4#
5
6# User settings here
7DAEMON=tor
8RUN_AS_USER=tor
9
10# Check for configuration files
11[ -f /etc/tor/torrc ] || exit 1
12
13# If you have to edit this section for this or any other
14# port useage let me know, with a patch or added lines,
15# or simplely e-mail me the altered file and I'll include the changes.
16
17RETVAL=0
18
19case $1 in
20start)
21 echo -n "Starting $DAEMON..."
22 su $RUN_AS_USER -c /usr/bin/$DAEMON > /dev/null & RETVAL=$?
23 if [ $RETVAL = 0 ]; then
24 echo " done."
25 fi
26 ;;
27stop)
28 echo -n "Shutting down $DAEMON..."
29 killall -q /usr/bin/$DAEMON
30 RETVAL=$?
31 echo " done."
32 ;;
33restart)
34 $0 stop
35 sleep 5
36 $0 start
37 RETVAL=$?
38 ;;
39*)
40 echo "usage: $0 [start|stop|restart]"
41 exit 1
42 ;;
43esac
44
45exit $RETVAL
46
47# End of file