]>
Commit | Line | Data |
---|---|---|
b312967c MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/tor | |
4 | # | |
5 | # Description : Anonymizing overlay network for TCP | |
6 | # | |
7 | ######################################################################## | |
8 | ||
9 | . /etc/sysconfig/rc | |
10 | . ${rc_functions} | |
11 | ||
12 | case "${1}" in | |
13 | start) | |
14 | boot_mesg "Starting tor..." | |
15 | loadproc /usr/bin/tor \ | |
16 | --runasdaemon 1 \ | |
17 | --defaults-torrc /usr/share/tor/defaults-torrc \ | |
18 | -f /etc/tor/torrc \ | |
19 | --quiet | |
20 | ;; | |
21 | ||
22 | stop) | |
23 | boot_mesg "Stopping tor..." | |
24 | killproc /usr/bin/tor | |
25 | ;; | |
26 | ||
27 | reload) | |
28 | boot_mesg "Reloading tor..." | |
29 | reloadproc /usr/bin/tor | |
30 | ;; | |
31 | ||
32 | restart) | |
33 | ${0} stop | |
34 | sleep 1 | |
35 | ${0} start | |
36 | ;; | |
37 | ||
38 | status) | |
39 | statusproc /usr/bin/tor | |
40 | ;; | |
41 | ||
42 | *) | |
43 | echo "Usage: ${0} {start|stop|reload|restart|status}" | |
44 | exit 1 | |
45 | ;; | |
46 | esac | |
47 | ||
48 | # End $rc_base/init.d/tor |