Lines 3-10
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
|
4 |
|
5 |
command=/usr/bin/tor |
5 |
command=/usr/bin/tor |
6 |
pidfile=/run/tor/tor.pid |
6 |
pidfile=/run/tor/${RC_SVCNAME}.pid |
7 |
command_args="--hush --runasdaemon 1 --pidfile \"${pidfile}\"" |
7 |
command_args="--hush -f ${torrc} --runasdaemon 1 --pidfile \"${pidfile}\"" |
8 |
retry=${GRACEFUL_TIMEOUT:-60} |
8 |
retry=${GRACEFUL_TIMEOUT:-60} |
9 |
stopsig=INT |
9 |
stopsig=INT |
10 |
command_progress=yes |
10 |
command_progress=yes |
Lines 16-24
description_checkconfig="Check for valid config file"
Link Here
|
16 |
description_reload="Reload the configuration" |
16 |
description_reload="Reload the configuration" |
17 |
|
17 |
|
18 |
checkconfig() { |
18 |
checkconfig() { |
19 |
${command} --verify-config --hush > /dev/null 2>&1 |
19 |
${command} --verify-config --hush -f ${torrc} > /dev/null 2>&1 |
20 |
if [ $? -ne 0 ] ; then |
20 |
if [ $? -ne 0 ] ; then |
21 |
eerror "Tor configuration (/etc/tor/torrc) is not valid." |
21 |
eerror "Tor configuration (${torrc}) is not valid." |
22 |
eerror "Example is in /etc/tor/torrc.sample" |
22 |
eerror "Example is in /etc/tor/torrc.sample" |
23 |
return 1 |
23 |
return 1 |
24 |
fi |
24 |
fi |