Fixed jitsi.sh back
This commit is contained in:
parent
889538c721
commit
d0812e7f99
59
lib/jitsi.sh
59
lib/jitsi.sh
@ -429,12 +429,19 @@ cat > /federated/apps/jitsi/.env <<EOF
|
||||
# Directory where all configuration will be stored
|
||||
CONFIG=/federated/apps/jitsi/data/config
|
||||
|
||||
EOF
|
||||
if [ "$JITSI_SCALE" != "server" ]; then
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
# Exposed HTTP port
|
||||
HTTP_PORT=9000
|
||||
|
||||
# Exposed HTTPS port
|
||||
HTTPS_PORT=9443
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
# System time zone
|
||||
TZ=UTC
|
||||
|
||||
@ -444,21 +451,45 @@ EOF
|
||||
|
||||
if [ "$JITSI_SCALE" = "server" ]; then
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
XMPP_AUTH_DOMAIN=auth.jitsitest.federatedcomputer.cloud
|
||||
XMPP_SERVER=xmpp.jitsitest.federatedcomputer.cloud
|
||||
XMPP_INTERNAL_MUC_DOMAIN=internal-muc.jitsitest.federatedcomputer.cloud
|
||||
XMPP_SERVER=xmpp.jitsitest.federatedcomputer.cloud,xmpp.jitsitest2.fedcom.net
|
||||
EOF
|
||||
else
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
XMPP_SERVER=xmpp.$DOMAIN
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -n "$JITSI_SCALE" ]; then
|
||||
# XMPP_AUTH_DOMAIN and XMPP_INTERNAL_MUC_DOMAIN don't
|
||||
# need to resolve - they just need to be identical across
|
||||
# the involved Jitsi components.
|
||||
# So it is safe to use a common (even if nonexistant)
|
||||
# domain across all Jitsi Scale clients so the JVB can
|
||||
# use the same information for every Prosody instance
|
||||
# it connects to.
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
XMPP_AUTH_DOMAIN=auth.jitsiscale.federated.computer
|
||||
XMPP_INTERNAL_MUC_DOMAIN=internal-muc.jitsiscale.federated.computer
|
||||
EOF
|
||||
else
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
XMPP_AUTH_DOMAIN=auth.$DOMAIN
|
||||
XMPP_INTERNAL_MUC_DOMAIN=internal-muc.$DOMAIN
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$JITSI_SCALE" = "server" ]; then
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
|
||||
# XMPP password for JVB client connections
|
||||
JVB_AUTH_PASSWORD=
|
||||
EOF
|
||||
else
|
||||
|
||||
cat >> /federated/apps/jitsi/.env <<EOF
|
||||
XMPP_DOMAIN=$DOMAIN
|
||||
XMPP_AUTH_DOMAIN=auth.$DOMAIN
|
||||
XMPP_SERVER=xmpp.$DOMAIN
|
||||
XMPP_BOSH_URL_BASE=http://xmpp.$DOMAIN:5280
|
||||
XMPP_MUC_DOMAIN=muc.$DOMAIN
|
||||
XMPP_INTERNAL_MUC_DOMAIN=internal-muc.$DOMAIN
|
||||
XMPP_GUEST_DOMAIN=guest.$DOMAIN
|
||||
XMPP_RECORDER_DOMAIN=recorder.$DOMAIN
|
||||
|
||||
@ -740,6 +771,7 @@ EOF
|
||||
docker exec mail bash -c "mail -r admin@$DOMAIN -a \"Content-type: text/html\" -s \"Application installed on $DOMAIN\" $EMAIL < /root/certs/mailfile"
|
||||
rm /federated/apps/mail/data/root/certs/mailfile
|
||||
|
||||
kill -9 $SPINPID &> /dev/null
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
uninstall_jitsi() {
|
||||
@ -764,8 +796,8 @@ uninstall_jitsi() {
|
||||
if [[ $(grep "### Jitsi" /federated/apps/authelia/data/config/idproviders.yml 2>/dev/null) ]]; then
|
||||
sed -i '/### Jitsi/,/### /{/### PowerDNS/!{/### /!d}}' /federated/apps/authelia/data/config/idproviders.yml
|
||||
sed -i '/### Jitsi/d' /federated/apps/authelia/data/config/idproviders.yml
|
||||
run_command "/federated/bin/stop authelia
|
||||
run_command "/federated/bin/start authelia
|
||||
run_command "/federated/bin/stop authelia"
|
||||
run_command "/federated/bin/start authelia"
|
||||
fi
|
||||
|
||||
if [[ -d "/federated/apps/jitsiopenid" ]]; then
|
||||
@ -779,7 +811,12 @@ uninstall_jitsi() {
|
||||
start_jitsi() {
|
||||
# Start service with command to make sure it's up before proceeding
|
||||
start_service "jitsi" "nc -z 192.168.0.25 443 &> /dev/null" "8"
|
||||
|
||||
# Allow multiple JVBs to connect
|
||||
if [ "$JITSI_SCALE" = "client" ]; then
|
||||
for i in $(seq 1 10); do
|
||||
docker exec -ti jitsi-prosody-1 prosodyctl --config /config/prosody.cfg.lua register jvb$i auth.jitsiscale.federated.computer J17515cAl3-jvb
|
||||
done
|
||||
fi
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
configsso_jitsi() {
|
||||
@ -793,7 +830,7 @@ configsso_jitsi() {
|
||||
JITSI_CLIENT_SECRET=$(create_password);
|
||||
#echo "$JITSI_CLIENT_SECRET" > /federated/apps/jitsi/.jitsiclient.secret
|
||||
#chmod 600 /federated/apps/jitsi/.jitsiclient.secret
|
||||
JITSI_CLIENT_SECRET_HASH=$(docker run --rm authelia/authelia:latest authelia crypto hash generate pbkdf2 --password $JITSI_CLIENT_SECRET | awk '{ print $2 }')
|
||||
JITSI_CLIENT_SECRET_HASH=$(docker run -it --rm authelia/authelia:latest authelia crypto hash generate pbkdf2 --password $JITSI_CLIENT_SECRET | awk '{ print $2 }')
|
||||
|
||||
cat >> /federated/apps/authelia/data/config/idproviders.yml <<EOF
|
||||
### Jitsi
|
||||
@ -877,6 +914,4 @@ chmod 600 /federated/apps/jitsiopenid/.env
|
||||
run_command "/federated/bin/stop jitsi"
|
||||
run_command "/federated/bin/start jitsi"
|
||||
run_command "/federated/bin/start jitsiopenid"
|
||||
|
||||
echo -ne "done.\n"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user