This commit is contained in:
Bob Mottram 2016-11-09 19:38:22 +00:00
parent 423309d390
commit 7421073c2b
1 changed files with 2 additions and 35 deletions

View File

@ -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 {