3 # tor Anonymizing overlay network for TCP
6 # description: Tor is a connection-based low-latency anonymous communication system.
8 # pidfile: /var/run/tor.pid
12 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
18 TOR_CONFIG="/etc/tor/torrc"
20 [ -f /etc/sysconfig/tor ] && . /etc/sysconfig/tor
22 if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network ]; then
33 if [ ! -f /var/lock/subsys/tor ]; then
35 daemon tor --user $TOR_USER --group $TOR_GROUP \
36 --pidfile /var/run/tor.pid -f $TOR_CONFIG $TOR_OPTIONS
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/tor
40 msg_already_running tor
44 if [ -f /var/lock/subsys/tor ]; then
46 killproc --pidfile /var/run/tor.pid tor
47 rm -f /var/lock/subsys/tor
58 if [ -f /var/lock/subsys/tor ]; then
63 msg_not_running tor >&2
68 # if program allows reloading without stopping
77 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
83 # This must be last line !
84 # vi:syntax=sh:ts=8:sw=4