]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/initscripts/init.d/tor
2 ########################################################################
3 # Begin $rc_base/init.d/tor
5 # Description : Anonymizing overlay network for TCP
7 ########################################################################
12 function setup_firewall
() {
13 eval $
(readhash
/var
/ipfire
/tor
/settings
)
18 if [ "${TOR_RELAY_ENABLED}" = "on" -a -n "${TOR_RELAY_PORT}" ]; then
19 iptables
-A TOR_INPUT
-p tcp
--dport "${TOR_RELAY_PORT}" -j ACCEPT
23 function flush_firewall
() {
33 boot_mesg
"Starting tor..."
34 loadproc
/usr
/bin
/tor \
36 --defaults-torrc /usr
/share
/tor
/defaults-torrc \
45 boot_mesg
"Stopping tor..."
53 boot_mesg
"Reloading tor..."
54 reloadproc
/usr
/bin
/tor
64 # Reload the process if it is already running. Otherwise, restart.
65 if pidofproc
-s /usr
/bin
/tor
; then
73 statusproc
/usr
/bin
/tor
77 echo "Usage: ${0} {start|stop|reload|restart|reload-or-restart|status}"
82 # End $rc_base/init.d/tor