|
@@ -116,11 +116,13 @@ function add_onion_service {
|
116
|
116
|
|
117
|
117
|
if [ -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; then
|
118
|
118
|
echo $(cat ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname)
|
|
119
|
+ USE_V2_ONION_ADDRESS=
|
119
|
120
|
return
|
120
|
121
|
fi
|
121
|
122
|
|
122
|
123
|
if [ ! -d /var/lib/tor ]; then
|
123
|
124
|
echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
|
|
125
|
+ USE_V2_ONION_ADDRESS=
|
124
|
126
|
exit 877367
|
125
|
127
|
fi
|
126
|
128
|
if ! grep -q "hidden_service_${onion_service_name}" /etc/tor/torrc; then
|
|
@@ -129,7 +131,6 @@ function add_onion_service {
|
129
|
131
|
echo 'HiddenServiceVersion 3' >> /etc/tor/torrc
|
130
|
132
|
else
|
131
|
133
|
echo 'HiddenServiceVersion 2' >> /etc/tor/torrc
|
132
|
|
- USE_V2_ONION_ADDRESS=
|
133
|
134
|
fi
|
134
|
135
|
echo "HiddenServicePort ${onion_service_port_from} 127.0.0.1:${onion_service_port_to}" >> /etc/tor/torrc
|
135
|
136
|
if [ ${#onion_stealth_name} -gt 0 ]; then
|
|
@@ -137,6 +138,8 @@ function add_onion_service {
|
137
|
138
|
fi
|
138
|
139
|
fi
|
139
|
140
|
|
|
141
|
+ USE_V2_ONION_ADDRESS=
|
|
142
|
+
|
140
|
143
|
onion_update
|
141
|
144
|
|
142
|
145
|
function_check wait_for_onion_service
|