3 PATH
=/usr
/local
/sbin
:/usr
/local
/bin
:/sbin
:/bin
:/usr
/sbin
:/usr
/bin
7 TORLOG
=/var
/log
/tor
/log
8 TORPID
=/var
/run
/tor
/tor.pid
9 ARGS
="--pidfile $TORPID --logfile $TORLOG --runasdaemon 1"
11 test -x $DAEMON ||
exit 0
13 # Include tor defaults if available
14 if [ -f /etc
/default
/tor
] ; then
22 if [ "$RUN_DAEMON" != "yes" ]; then
23 echo "Not starting $DESC (Disabled in /etc/default/tor)."
25 echo -n "Starting $DESC: "
26 start-stop-daemon
--start --quiet --oknodo \
27 --chuid debian-tor
:debian-tor \
29 --exec $DAEMON -- $ARGS
34 echo -n "Stopping $DESC: "
35 start-stop-daemon
--stop --quiet --oknodo --pidfile $TORPID \
40 echo "Reloading $DESC configuration."
41 start-stop-daemon
--stop --signal 1 --oknodo --quiet --pidfile $TORPID \
50 echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2