From 235cdcc9daf6e0597fe6db5cb2b33eb804dc27b7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 6 Jan 2016 09:47:51 +0000 Subject: [PATCH] onion domain for voip --- src/freedombone | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/freedombone b/src/freedombone index f5797d26..ee5f5140 100755 --- a/src/freedombone +++ b/src/freedombone @@ -354,6 +354,7 @@ VOIP_SERVER_PASSWORD= VOIP_PORT=64738 SIP_SERVER_PASSWORD= SIP_PORT=5060 +VOIP_ONION_PORT=8095 # Location of VoIP database and configuration VOIP_DATABASE="mumble-server.sqlite" @@ -9499,7 +9500,16 @@ function install_voip { sed -i 's|#imagemessagelength=.*|imagemessagelength=131072|g' /etc/mumble-server.ini sed -i 's|#allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini sed -i 's|allowhtml=.*|allowhtml=False|g' /etc/mumble-server.ini - sed -i "s|port=.*|port=$VOIP_PORT|g" /etc/mumble-server.ini + + VOIP_ONION_HOSTNAME=$(add_onion_service voip ${VOIP_PORT} ${VOIP_ONION_PORT}) + if [[ $ONION_ONLY != "no" ]]; then + sed -i "s|port=.*|port=${VOIP_ONION_PORT}|g" /etc/mumble-server.ini + else + sed -i "s|port=.*|port=${VOIP_PORT}|g" /etc/mumble-server.ini + fi + if ! grep -q $"VoIP onion domain" $COMPLETION_FILE; then + echo "VoIP onion domain:$VOIP_ONION_HOSTNAME" >> $COMPLETION_FILE + fi systemctl restart mumble-server @@ -9508,6 +9518,7 @@ function install_voip { echo '' >> /home/$MY_USERNAME/README echo $'VoIP Server' >> /home/$MY_USERNAME/README echo '===========' >> /home/$MY_USERNAME/README + echo $"VoIP onion domain:$VOIP_ONION_HOSTNAME" >> /home/$MY_USERNAME/README echo $'VoIP server username: mumble-server' >> /home/$MY_USERNAME/README if [[ $SYSTEM_TYPE != "VARIANT_MESH" ]]; then echo $"VoIP server password: $VOIP_SERVER_PASSWORD" >> /home/$MY_USERNAME/README