From 7421073c2b1d50e70ed28892777771762d304c7e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 9 Nov 2016 19:38:22 +0000 Subject: [PATCH] Tidying --- src/freedombone-app-jitsi | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/src/freedombone-app-jitsi b/src/freedombone-app-jitsi index 436e165d..02ac7807 100755 --- a/src/freedombone-app-jitsi +++ b/src/freedombone-app-jitsi @@ -37,24 +37,18 @@ SHOW_ON_ABOUT=1 VIDEOBRIDGE_PORT=5347 JITSI_ONION_PORT=8102 -JITSI_VIDEOBRIDGE_ONION_PORT=8103 -JITSI_AUTH_ONION_PORT=8104 -JITSI_FOCUS_ONION_PORT=8105 JITSI_PORT=5280 # domains JITSI_DOMAIN_NAME= JITSI_CODE= JITSI_ONION_HOSTNAME= -JITSI_AUTH_ONION_HOSTNAME= jitsi_variables=(ONION_ONLY JITSI_DOMAIN_NAME - JITSI_CODE - JITSI_MEET_REPO - JITSI_MEET_COMMIT - DEFAULT_DOMAIN_NAME JITSI_ONION_HOSTNAME + JITSI_CODE + DEFAULT_DOMAIN_NAME MY_USERNAME) function change_password_jitsi { @@ -70,26 +64,6 @@ function can_install_videobridge { fi } -function add_jitsi_onion_domain { - jitsi_subdomain_name="$1" - jitsi_subdomain_port="$2" - jitsi_subdomain_onion_port="$3" - - new_domain=$(add_onion_service "${jitsi_subdomain_name}" ${jitsi_subdomain_port} ${jitsi_subdomain_onion_port}) - - if ! grep -q "Jitsi ${jitsi_subdomain_name} onion domain" /home/${MY_USERNAME}/README; then - echo $"Jitsi ${jitsi_subdomain_name} onion domain: ${new_domain}" >> /home/${MY_USERNAME}/README - echo '' >> /home/${MY_USERNAME}/README - chown ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/README - chmod 600 /home/${MY_USERNAME}/README - else - if [ -f /home/${MY_USERNAME}/README ]; then - sed -i "s|Jitsi ${jitsi_subdomain_name} onion domain.*|Jitsi ${jitsi_subdomain_name} onion domain: ${new_domain}|g" /home/${MY_USERNAME}/README - fi - fi - echo "${new_domain}" -} - function create_jitsi_subdomains { JITSI_ONION_HOSTNAME=$(add_onion_service jitsi 80 ${JITSI_ONION_PORT}) @@ -103,18 +77,11 @@ function create_jitsi_subdomains { sed -i "s|Jitsi onion domain.*|Jitsi onion domain: ${JITSI_ONION_HOSTNAME}|g" /home/${MY_USERNAME}/README fi fi - - #JITSI_VIDEOBRIDGE_ONION_HOSTNAME=$(add_jitsi_onion_domain jitsi-videobridge ${VIDEOBRIDGE_PORT} ${JITSI_VIDEOBRIDGE_ONION_PORT}) - #JITSI_AUTH_ONION_HOSTNAME=$(add_jitsi_onion_domain jitsi-auth 5222 ${JITSI_AUTH_ONION_PORT}) - #JITSI_FOCUS_ONION_HOSTNAME=$(add_jitsi_onion_domain jitsi-focus 5222 ${JITSI_FOCUS_ONION_PORT}) } function remove_jitsi_subdomains { function_check remove_onion_service remove_onion_service jitsi ${JITSI_ONION_PORT} - #remove_onion_service jitsi-videobridge ${JITSI_VIDEOBRIDGE_ONION_PORT} - #remove_onion_service jitsi-auth ${JITSI_AUTH_ONION_PORT} - #remove_onion_service jitsi-focus ${JITSI_FOCUS_ONION_PORT} } function remove_user_jitsi {