From b271402c52719eeba91ab57bc981cf4abdb41368 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 16 Jul 2024 20:09:02 -0600 Subject: [PATCH] qji,etherpad: fix nginx configuration and enable livestreaming by default --- etherpad-docker.sh | 8 ++++++-- quick_jibri_installer.sh | 20 +++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/etherpad-docker.sh b/etherpad-docker.sh index 6e384d3..8b3b47e 100644 --- a/etherpad-docker.sh +++ b/etherpad-docker.sh @@ -118,10 +118,14 @@ elif [ -f "$WS_CONF" ]; then echo "> Setting up webserver configuration file..." sed -i "/$WS_CONF_MATCH1/i \ \ \ \ #Etherpad block" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF" - sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Upgrade \$http_upgrade;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Connection \$connection_upgrade;" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_buffering off;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_redirect off;" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \ \ \ \ }" "$WS_CONF" sed -i "/$WS_CONF_MATCH1/i \\\n" "$WS_CONF" else @@ -134,7 +138,7 @@ if [ "$(grep -c "etherpad_base" "$WS_CONF")" != 0 ]; then echo -e "> $MEET_CONF seems configured, skipping...\n" else echo -e "> Setting etherpad domain at $MEET_CONF...\n" - sed -i "/ openSharedDocumentOnJoin:/a\ \ \ \ etherpad_base: \'https://$DOMAIN/etherpad/p/\'," "$MEET_CONF" + sed -i "s|// etherpad_base: .*|etherpad_base: \'https://$DOMAIN/etherpad/p/\',|" "$MEET_CONF" fi echo "> Checking nginx configuration..." diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 5e506f9..63df8c8 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -860,21 +860,19 @@ BREWERY # Jibri tweaks for /etc/jitsi/meet/$DOMAIN-config.js sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF" -#New recording implementation. + +#Enable recording by default. sed -i "s|// recordingService:|recordingService:|" "$MEET_CONF" -sed -i "/recordingService/,/hideStorageWarning/s|// enabled: false,| enabled: true,|" "$MEET_CONF" -sed -i "/hideStorageWarning: false/,/Local recording configuration/s|// },|},|" "$MEET_CONF" +sed -i "/recordingService/,/hideStorageWarning/s|// enabled: false,| enabled: true,|" "$MEET_CONF" +sed -i "/hideStorageWarning: false/,/}/s|// },|},|" "$MEET_CONF" sed -i "/fileRecordingsServiceEnabled: false,/a \\ hiddenDomain: \'recorder.$DOMAIN\'," "$MEET_CONF" -##Setup main language -#if [ -z "$JB_LANG" ] || [ "$JB_LANG" = "en" ]; then - #echo "Leaving English (en) as default language..." - #sed -i "s|// defaultLanguage: 'en',|defaultLanguage: 'en',|" "$MEET_CONF" -#else - #echo "Changing default language to: $JB_LANG" - #sed -i "s|// defaultLanguage: 'en',|defaultLanguage: \'$JB_LANG\',|" "$MEET_CONF" -#fi +#Enable livestreaming by default. +sed -i "s|// liveStreaming:|liveStreaming:|" "$MEET_CONF" +sed -i "/liveStreaming:/,/helpLink:/s|// enabled: false,| enabled: true,|" "$MEET_CONF" +sed -i "s|// helpLink:| helpLink:|" "$MEET_CONF" +sed -i "/helpLink:/,/}/s|// },|},|" "$MEET_CONF" # Recording directory if [ ! -d "$DIR_RECORD" ]; then -- 2.34.1