summaryrefslogtreecommitdiff
path: root/contrib/tor.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tor.sh.in')
-rw-r--r--contrib/tor.sh.in21
1 files changed, 19 insertions, 2 deletions
diff --git a/contrib/tor.sh.in b/contrib/tor.sh.in
index 151d119013..dfde1f6a45 100644
--- a/contrib/tor.sh.in
+++ b/contrib/tor.sh.in
@@ -2,8 +2,8 @@
#
#tor The Onion Router
#
-#chkconfig:2345 90 10
-#description: Onion Router
+# chkconfig: 2345 90 10
+# description: Onion Router
TORUSER=
TORGROUP=
@@ -61,6 +61,22 @@ case "$1" in
fi
;;
+ reload)
+ if [ -f $TORPID ]; then
+ echo -n "Sending HUP to tor..."
+ kill -HUP `cat $TORPID`
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ echo " ok"
+ else
+ echo " ERROR!"
+ fi
+ else
+ echo "Unable to kill tor: $TORPID does not exist"
+ RETVAL=1
+ fi
+ ;;
+
restart)
$0 stop
if [ -f $TORPID ]; then
@@ -69,6 +85,7 @@ case "$1" in
$0 start
;;
+
status)
PID=`cat $TORPID 2>/dev/null`
if [ "$PID" != "" ]; then