2010-05-11 22:25:49 +02:00
|
|
|
#!/bin/sh
|
2010-05-12 17:44:17 +02:00
|
|
|
#
|
|
|
|
# tor The Onion Router
|
|
|
|
#
|
|
|
|
# Startup/shutdown script for tor. This is a wrapper around torctl;
|
|
|
|
# torctl does the actual work in a relatively system-independent, or at least
|
|
|
|
# distribution-independent, way, and this script deals with fitting the
|
|
|
|
# whole thing into the conventions of the particular system at hand.
|
|
|
|
|
|
|
|
# This script is a modified contrb/tor.sh, for use on Slackware.
|
|
|
|
|
|
|
|
TORCTL=/usr/bin/torctl
|
2010-05-11 15:01:37 +02:00
|
|
|
|
2010-05-12 17:44:17 +02:00
|
|
|
# torctl will use these environment variables
|
|
|
|
TORUSER=tor
|
|
|
|
export TORUSER
|
2010-05-11 15:01:37 +02:00
|
|
|
|
|
|
|
case "$1" in
|
2010-05-12 17:44:17 +02:00
|
|
|
|
|
|
|
start)
|
|
|
|
$TORCTL start
|
|
|
|
;;
|
|
|
|
|
|
|
|
stop)
|
|
|
|
$TORCTL stop
|
|
|
|
;;
|
|
|
|
|
|
|
|
restart)
|
|
|
|
$TORCTL restart
|
|
|
|
;;
|
|
|
|
|
|
|
|
reload)
|
|
|
|
$TORCTL reload
|
|
|
|
;;
|
|
|
|
|
|
|
|
status)
|
|
|
|
$TORCTL status
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 (start|stop|restart|reload|status)"
|
2010-05-11 15:01:37 +02:00
|
|
|
esac
|