123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- if [ -f /etc/rc.d/init.d/functions ]; then
- . /etc/rc.d/init.d/functions
- elif [ -f /etc/init.d/functions ]; then
- . /etc/init.d/functions
- fi
- ulimit -n 8192
- TORCTL=@BINDIR@/torctl
- TORUSER=@TORUSER@
- export TORUSER
- TORGROUP=@TORGROUP@
- export TORGROUP
- if [ -x /bin/su ] ; then
- SUPROG=/bin/su
- elif [ -x /sbin/su ] ; then
- SUPROG=/sbin/su
- elif [ -x /usr/bin/su ] ; then
- SUPROG=/usr/bin/su
- elif [ -x /usr/sbin/su ] ; then
- SUPROG=/usr/sbin/su
- else
- SUPROG=/bin/su
- fi
- case "$1" in
- start)
- action $"Starting tor:" $TORCTL start
- RETVAL=$?
- ;;
- stop)
- action $"Stopping tor:" $TORCTL stop
- RETVAL=$?
- ;;
- restart)
- action $"Restarting tor:" $TORCTL restart
- RETVAL=$?
- ;;
- reload)
- action $"Reloading tor:" $TORCTL reload
- RETVAL=$?
- ;;
- status)
- $TORCTL status
- RETVAL=$?
- ;;
- *)
- echo "Usage: $0 (start|stop|restart|reload|status)"
- RETVAL=1
- esac
- exit $RETVAL
|