This commit is contained in:
Bob Mottram 2018-05-01 16:19:40 +01:00
parent 6b54de1c35
commit 569410b9cc
1 changed files with 3 additions and 3 deletions

View File

@ -644,7 +644,7 @@ function remove_xmpp {
function_check remove_onion_service
remove_onion_service xmpp 5222 5223 5269
sed -i '/HiddenServiceVersion 2/d' $ONION_SERVICES_FILE
sed -i '/HiddenServiceVersion 2/d' "$ONION_SERVICES_FILE"
apt-mark -q unhold prosody
apt-get -yq remove --purge prosody
@ -1131,11 +1131,11 @@ function install_xmpp {
echo $'No Tor installation found. xmpp onion site cannot be configured.'
exit 877367
fi
if ! grep -q "hidden_service_xmpp" $ONION_SERVICES_FILE; then
if ! grep -q "hidden_service_xmpp" "$ONION_SERVICES_FILE"; then
{ echo 'HiddenServiceDir /var/lib/tor/hidden_service_xmpp/';
echo 'HiddenServiceVersion 2';
echo "HiddenServicePort 5222 127.0.0.1:5222";
echo "HiddenServicePort 5269 127.0.0.1:5269"; } >> $ONION_SERVICES_FILE
echo "HiddenServicePort 5269 127.0.0.1:5269"; } >> "$ONION_SERVICES_FILE"
echo $'Added onion site for xmpp chat'
fi