#!/bin/bash # # Jitsi Service PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin . /etc/federated get_appvars config_jitsi() { echo -ne "* Configuring jitsi container.." if [ ! -d "/federated/apps/jitsi" ]; then mkdir -p /federated/apps/jitsi # mkdir -p /federated/apps/jitsi/data/config/keys &> /dev/null # cp -rf /federated/apps/dns/data/etc/letsencrypt/archive/$DOMAIN/*.pem apps/jitsi/data/config/keys # mv /federated/apps/jitsi/data/config/keys/fullchain1.pem apps/jitsi/data/config/keys/cert.crt # mv /federated/apps/jitsi/data/config/keys/privkey1.pem apps/jitsi/data/config/keys/cert.key # chmod 644 /federated/apps/jitsi/data/config/keys/*.pem fi grep -q JITSI_SCALE /etc/federated && sed -i -e '/JITSI_SCALE/d' /etc/federated if [ -n "$JITSI_SCALE" ]; then cat >>/etc/federated < /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml <> /federated/apps/jitsi/docker-compose.yml < /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env <> /federated/apps/jitsi/.env < /federated/apps/mail/data/root/certs/mailfile <

Jitsi is now installed on $DOMAIN

Here is your applications chart with on how to access this service:

Applications

Service Link User / Pass Access Docs Description
Jitsi jitsi.$DOMAIN admin@$DOMAIN
admin password in panel
All users in panel have access using user@$DOMAIN Click here Jitsi is a zoom replacement video conferencing solution

Thanks for your support!

Thank you for your support of Federated Computer. We really appreciate it and hope you have a very successful time with Federated Core.

Again, if we can be of any assistance, please don't hesitate to get in touch.

Support: https://support.federated.computer
Phone: (970) 722-8715
Email: support@federated.computer

It's your computer. Let's make it work for you! EOF # Send out e-mail from mail container with details 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() { echo -ne "* Uninstalling jitsi container.." # First stop the service cd /federated/apps/jitsi && docker compose -f docker-compose.yml -p jitsi down &> /dev/null # Delete the app directory rm -rf /federated/apps/jitsi # Delete the image docker image rm jitsi/jvb:$JITSI_IMAGE_VERSION &> /dev/null docker image rm jitsi/jicofo:$JITSI_IMAGE_VERSION &> /dev/null docker image rm jitsi/prosody:$JITSI_IMAGE_VERSION &> /dev/null docker image rm jitsi/web:$JITSI_IMAGE_VERSION &> /dev/null # Delete the DNS record [[ "${PLUS}" != "true" ]] && docker exec pdns pdnsutil delete-rrset $DOMAIN jitsi A # Uninstall the SSO configuration if it exists in authelia (authelia must exist too) 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" fi if [[ -d "/federated/apps/jitsiopenid" ]]; then cd /federated/apps/jitsiopenid && docker compose -f docker-compose.yml -p jitsiopenid down &> /dev/null rm -rf /federated/apps/jitsiopenid if [ "$(uname -m)" = "aarch64" ]; then docker image rm federatedcomputer/jitsi-go-openid:latest &> /dev/null else docker image rm mod242/jitsi-go-openid:latest &> /dev/null fi fi echo -ne "done.\n" } start_jitsi() { # Start service with command to make sure it's up before proceeding if [ "$JITSI_SCALE" = "server" ]; then start_service "jitsi" "nc -z 192.168.0.28 8080 &> /dev/null" "8" else start_service "jitsi" "nc -z 192.168.0.25 443 &> /dev/null" "8" fi # 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() { if [[ "${PLUS}" != "true" ]]; then echo -ne "* Configuring jitsi container with SSO.." [ ! -d "/federated/apps/authelia" ] && failcheck "Authelia is not installed. You need this first before continuing." [ ! -f "/federated/apps/authelia/data/config/idproviders.yml" ] && failcheck "Authelia idproviders.yml is missing." [[ $(grep "### Jitsi" /federated/apps/authelia/data/config/idproviders.yml 2>/dev/null) ]] && failcheck "Authelia already has a Jitsi configuration." JITSI_JWT_APP_SECRET=$(create_password); 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 }') cat >> /federated/apps/authelia/data/config/idproviders.yml <> /federated/apps/jitsi/.env # Install Jitsi OpenID GO plugin mkdir -p /federated/apps/jitsiopenid &> /dev/null if [ "$(uname -m)" = "aarch64" ]; then CONTAINER="federatedcomputer/jitsi-go-openid" else CONTAINER="mod242" fi cat >> /federated/apps/jitsiopenid/docker-compose.yml < /federated/apps/jitsiopenid/.env <> /federated/apps/jitsi/.env # Install Jitsi OpenID GO plugin mkdir -p /federated/apps/jitsiopenid &> /dev/null if [ "$(uname -m)" = "aarch64" ]; then CONTAINER="federatedcomputer/jitsi-go-openid" else CONTAINER="mod242" fi cat >> /federated/apps/jitsiopenid/docker-compose.yml < /federated/apps/jitsiopenid/.env <