From 37c45424d610e4ef077ff375a24240bb209f9eb8 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 6 Jun 2004 23:20:28 +0000 Subject: Checkpoint work towards making tor.spec work with current tor and conform (more or less) to fedora.us packaging guidelines svn:r1953 --- contrib/tor.sh.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'contrib/tor.sh.in') diff --git a/contrib/tor.sh.in b/contrib/tor.sh.in index 151d11901..dfde1f6a4 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 -- cgit v1.2.3