]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/tor
tor: Add torctrl binary.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / tor
index 6ae03130ef1559c6f222780b4fcb4a449a1d7750..82dab68bd9276487ca084f863973a1be12de8a86 100644 (file)
@@ -35,12 +35,21 @@ case "${1}" in
                ${0} start
                ;;
 
+       reload-or-restart)
+               # Reload the process if it is already running. Otherwise, restart.
+               if pidofproc -s /usr/bin/tor; then
+                       $0 reload
+               else
+                       $0 restart
+               fi
+               ;;
+
        status)
                statusproc /usr/bin/tor
                ;;
 
        *)
-               echo "Usage: ${0} {start|stop|reload|restart|status}"
+               echo "Usage: ${0} {start|stop|reload|restart|reload-or-restart|status}"
                exit 1
                ;;
 esac