| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | #! /bin/shPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDAEMON=/usr/sbin/torNAME=torDESC="tor daemon"TORLOG=/var/log/tor/logTORPID=/var/run/tor/tor.pidARGS="--pidfile $TORPID --logfile $TORLOG --runasdaemon 1"test -x $DAEMON || exit 0# Include tor defaults if availableif [ -f /etc/default/tor ] ; then	. /etc/default/torfiset -ecase "$1" in  start)	if [ "$RUN_DAEMON" != "yes" ]; then		echo "Not starting $DESC (Disabled in /etc/default/tor)."	else		echo -n "Starting $DESC: "		start-stop-daemon --start --quiet --oknodo \			--chuid debian-tor:debian-tor \			--pidfile $TORPID \			--exec $DAEMON -- $ARGS		echo "$NAME."	fi	;;  stop)	echo -n "Stopping $DESC: "	start-stop-daemon --stop --quiet --oknodo --pidfile $TORPID \		--exec $DAEMON	echo "$NAME."	;;  reload|force-reload)	echo "Reloading $DESC configuration."	start-stop-daemon --stop --signal 1 --oknodo --quiet --pidfile $TORPID \		--exec $DAEMON	;;  restart)	$0 stop	sleep 1	$0 start	;;  *)	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2	exit 1	;;esacexit 0
 |