From 9a5364b2c6a5e9307a72108e0ef38fe1ad9fe913 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jul 2024 08:29:09 -0600 Subject: [PATCH 1/6] misc: add match test, disable options, add brandless svg --- etherpad-docker.sh | 29 +++++++++++++------- images/watermark2.svg | 57 ++++++++++++++++++++++++++++++++++++++++ jm-bm.sh | 34 +++++++++++++----------- jra_nextcloud.sh | 2 +- quick_jibri_installer.sh | 39 ++++++++++----------------- 5 files changed, 111 insertions(+), 50 deletions(-) create mode 100644 images/watermark2.svg diff --git a/etherpad-docker.sh b/etherpad-docker.sh index 5e09faa..6e384d3 100644 --- a/etherpad-docker.sh +++ b/etherpad-docker.sh @@ -30,7 +30,7 @@ echo ' ######################################################################## by Software, IT & Networks Ltd ' - +FORGE_REPO="https://forge.switnet.net/switnet/quick-jibri-installer" check_apt_policy() { apt-cache policy 2>/dev/null| awk "/$1/{print \$3}" | awk -F '/' 'NR==1{print$2}' } @@ -42,6 +42,16 @@ if [ "$(dpkg-query -W -f='${Status}' "$1" 2>/dev/null | grep -c "ok installed")" apt-get -yq2 install "$1" fi } +# Test for matches +test_match() { +if grep -q "$1" "$2" ; then + echo "$(basename "$2") - OK..." +else + echo "$(basename "$2"), FAIL..." + echo "Please report this to $FORGE_REPO" + exit +fi +} DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" MEET_CONF="/etc/jitsi/meet/$DOMAIN-config.js" WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf" @@ -50,6 +60,7 @@ ETHERPAD_DB_USER="dockerpad" ETHERPAD_DB_NAME="etherpad" ETHERPAD_DB_PASS="$(tr -dc "a-zA-Z0-9#*=" < /dev/urandom | fold -w 10 | head -n1)" DOCKER_CE_REPO="$(check_apt_policy docker)" +WS_CONF_MATCH1="# ensure all static content can always be found first" echo "Add Docker repo" if [ "$DOCKER_CE_REPO" = "stable" ]; then @@ -105,14 +116,14 @@ if [ "$(grep -c etherpad "$WS_CONF")" != 0 ]; then echo "> Webserver seems configured, skipping..." elif [ -f "$WS_CONF" ]; then echo "> Setting up webserver configuration file..." - sed -i "/# ensure all static content can always be found first/i \ \ \ \ #Etherpad block" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ location \^\~\ \/etherpad\/ {" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_buffering off;" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ }" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \\\n" "$WS_CONF" + 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_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_set_header Host \$host;" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \ \ \ \ }" "$WS_CONF" + sed -i "/$WS_CONF_MATCH1/i \\\n" "$WS_CONF" else echo "> No etherpad config done to server file, please report to: -> https://forge.switnet.net/switnet/quick-jibri-installer/issues" diff --git a/images/watermark2.svg b/images/watermark2.svg new file mode 100644 index 0000000..92f632b --- /dev/null +++ b/images/watermark2.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + diff --git a/jm-bm.sh b/jm-bm.sh index e12a264..0140ad3 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -27,6 +27,7 @@ BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js" # JM_IMG_PATH="/usr/share/jitsi-meet/images" WTM2_PATH="$JM_IMG_PATH/watermark2.png" +WTM2_SVG_PATH="$JM_IMG_PATH/watermark2.png" FICON_PATH="$JM_IMG_PATH/favicon2.ico" REC_ICON_PATH="$JM_IMG_PATH/gnome_record.png" # @@ -36,29 +37,30 @@ PART_USER="Participant" LOCAL_USER="me" # #SEC_ROOM="TBD" +copy_if_not_there() { + if [ ! -f "$1" ]; then + cp images/"$(echo $1|xargs basename)" "$1" + else + echo "$(echo $1|xargs basename) file exists, skipping copying..." + fi +} echo ' #-------------------------------------------------- # Applying Brandless mode #-------------------------------------------------- ' + #Watermark -if [ ! -f "$WTM2_PATH" ]; then - cp images/watermark2.png "$WTM2_PATH" -else - echo "watermark2 file exists, skipping copying..." -fi +copy_if_not_there "$WTM2_PATH" + +#Watermark svg +copy_if_not_there "$WTM2_SVG_PATH" + #Favicon -if [ ! -f "$FICON_PATH" ]; then - cp images/favicon2.ico "$FICON_PATH" -else - echo "favicon2 file exists, skipping copying..." -fi +copy_if_not_there "$FICON_PATH" + #Local recording icon -if [ ! -f "$REC_ICON_PATH" ];then - cp images/gnome_record.png "$REC_ICON_PATH" -else - echo "recording icon exists, skipping copying..." -fi +copy_if_not_there "$REC_ICON_PATH" #Custom / Remove icons sed -i "s|watermark.png|watermark2.png|g" "$CSS_FILE" @@ -70,6 +72,8 @@ sed -i "s|icon-cloud.png|gnome_record.png|g" "$BUNDLE_JS" if ! grep -q ".leftwatermark{display:none" "$CSS_FILE" ; then sed -i "s|.leftwatermark{|.leftwatermark{display:none;|" "$CSS_FILE" fi +#Replace App logo +sed -i "s|// defaultLogoUrl: .*| defaultLogoUrl: 'images/watermark2.svg',|" "$MEET_CONF" #Customize room title sed -i "s|Jitsi Meet|$APP_NAME|g" "$TITLE_FILE" diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index f752b69..ccedcdd 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -59,7 +59,7 @@ DIR_RECORD="$(awk -F '"' '/RECORDING/{print$2}' /home/jibri/finalize_recording REDIS_CONF="/etc/redis/redis.conf" JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" [ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1) -PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" +PUBLIC_IP="$(dig -4 +short myip.opendns.com @resolver1.opendns.com)" ISO3166_CODE=TBD NL="$(printf '\n ')" diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index bf0a0c4..5e506f9 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -567,18 +567,6 @@ do fi done sleep .1 -#Language -echo "## Setting up Jitsi Meet language ## -You can define the language, for a complete list of the supported languages - -See here: -https://github.com/jitsi/jitsi-meet/blob/master/lang/languages.json" -printf "Jitsi Meet web interface will be set to use such language.\n\n" -sleep .1 -read -p "Please set your language (Press enter to default to 'en'):$NL" -r JB_LANG -sleep .1 -printf "\nWe'll take a minute to localize some UI excerpts if you need.\n\n" -sleep .1 #Participant printf "> Do you want to translate 'Participant' to your own language?\n" sleep .1 @@ -876,18 +864,17 @@ sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF" 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 "s|// liveStreamingEnabled: false,|liveStreamingEnabled: true,\\ -\\ - hiddenDomain: \'recorder.$DOMAIN\',|" "$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 +##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 # Recording directory if [ ! -d "$DIR_RECORD" ]; then @@ -1197,9 +1184,11 @@ sed -i "s|// startAudioMuted: 10,|startAudioMuted: 1,|" "$MEET_CONF" #Disable/enable welcome page if [ "$ENABLE_WELCP" = "yes" ]; then - sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: false,|" "$MEET_CONF" + sed -i "/ welcomePage: {/,/},/s|// ||" "$MEET_CONF" + sed -i "/ welcomePage: {/,/},/s|disabled: .*,|disabled: true,|" "$MEET_CONF" elif [ "$ENABLE_WELCP" = "no" ]; then - sed -i "s|.*enableWelcomePage:.*| enableWelcomePage: true,|" "$MEET_CONF" + sed -i "/ welcomePage: {/,/},/s|// ||" "$MEET_CONF" + sed -i "/ welcomePage: {/,/},/s|disabled: .*,|disabled: false,|" "$MEET_CONF" fi #Enable close page if [ "$ENABLE_CLOCP" = "yes" ]; then -- 2.34.1 From 998ca69ddfa38a3b7d08f17038e33e0558df8fcd Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jul 2024 12:22:49 -0600 Subject: [PATCH 2/6] testing updates for grafana --- grafana.sh | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/grafana.sh b/grafana.sh index 94edc35..09f1e23 100644 --- a/grafana.sh +++ b/grafana.sh @@ -43,11 +43,21 @@ systemctl enable "$1" systemctl restart "$1" systemctl status "$1" } +test_match() { + if grep -q "$1" "$2" ; then + echo "$(basename "$2") - OK..." + else + echo "$(basename "$2"), FAIL..." + echo "Please report this to https://forge.switnet.net/switnet/quick-jibri-installer" + exit + fi +} MAIN_TEL="/etc/telegraf/telegraf.conf" TEL_JIT="/etc/telegraf/telegraf.d/jitsi.conf" GRAFANA_INI="/etc/grafana/grafana.ini" DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf" +WS_MATCH1="# ensure all static content can always be found first" GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" # Min requirements @@ -57,11 +67,17 @@ apt-get install -y gnupg2 \ wget \ jq +# Make sure we can rely on the match strings. +printf "> Testing match strings on config files.\n" +test_match "$WS_MATCH1" "$WS_CONF" + echo " # Setup InfluxDB Packages " -curl -s https://repos.influxdata.com/influxdata-archive.key > /etc/apt/trusted.gpg.d/influxdata-archive.key -echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.key] https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list +curl -s https://repos.influxdata.com/influxdata-archive.key > \ + /etc/apt/trusted.gpg.d/influxdata-archive.key +echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive.key] https://repos.influxdata.com/debian buster stable" | \ + sudo tee /etc/apt/sources.list.d/influxdb.list apt-get update && apt-get install influxdb -y run_service influxdb @@ -70,7 +86,8 @@ echo " " curl -s https://apt.grafana.com/gpg-full.key | \ gpg --dearmor | tee /etc/apt/trusted.gpg.d/grafana-full-key.gpg >/dev/null -add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" +echo "deb https://packages.grafana.com/oss/deb stable main" | \ + sudo tee /etc/apt/sources.list.d/grafana_com_oss_deb.list apt-get update && apt-get install grafana -y run_service grafana-server @@ -138,11 +155,13 @@ echo ' # extra options to pass to the JVB daemon JVB_OPTS="--apis=rest,xmpp"' >> /etc/jitsi/videobridge/config sed -i "s|TRANSPORT=muc|TRANSPORT=muc,colibri|" /etc/jitsi/videobridge/sip-communicator.properties +# Enable videobridge REST API +hocon -f /etc/jitsi/videobridge/jvb.conf set videobridge.apis.rest.enabled true systemctl restart jitsi-videobridge2 echo -e "\n# Setup Grafana nginx domain\n" sed -i "s|;protocol =.*|protocol = http|" $GRAFANA_INI -sed -i "s|;http_addr =.*|http_addr = localhost|" $GRAFANA_INI +sed -i "s|;http_addr =.*|http_addr = 127.0.0.1|" $GRAFANA_INI sed -i "s|;http_port =.*|http_port = 3000|" $GRAFANA_INI sed -i "s|;domain =.*|domain = $DOMAIN|" $GRAFANA_INI sed -i "s|;enforce_domain =.*|enforce_domain = false|" $GRAFANA_INI @@ -160,10 +179,10 @@ while [ $secs -gt 0 ]; do done if [ -f "$WS_CONF" ]; then - sed -i "/# ensure all static content can always be found first/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \ \ \ \ }" "$WS_CONF" - sed -i "/# ensure all static content can always be found first/i \\\n" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF" + sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF" systemctl restart nginx else echo "No app configuration done to server file, please report to: @@ -179,7 +198,7 @@ PUT -H "Content-Type: application/json;charset=UTF-8" -d \ \"oldPassword\": \"admin\", \"newPassword\": \"$GRAFANA_PASS\", \"confirmNew\": \"$GRAFANA_PASS\" -}" http://localhost:3000/api/user/password; echo "" +}" http://127.0.0.1:3000/api/user/password; echo "" echo " # Create InfluxDB datasource @@ -189,16 +208,16 @@ POST -H 'Content-Type: application/json;charset=UTF-8' -d \ '{ "name": "InfluxDB", "type": "influxdb", - "url": "http://localhost:8086", + "url": "http://127.0.0.1:8086", "access": "proxy", "isDefault": true, "database": "jitsi" -}' http://localhost:3000/api/datasources; echo "" +}' http://127.0.0.1:3000/api/datasources; echo "" echo " # Add Grafana Dashboard " -grafana_host="http://localhost:3000" +grafana_host="http://127.0.0.1:3000" grafana_cred="admin:$GRAFANA_PASS" grafana_datasource="InfluxDB" ds=(11969); -- 2.34.1 From 1638096ba7cec9362d4afcf8788f589f16722ea1 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Wed, 3 Jul 2024 21:58:19 -0600 Subject: [PATCH 3/6] return to localhost on most grafana. --- grafana.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grafana.sh b/grafana.sh index 09f1e23..f498e36 100644 --- a/grafana.sh +++ b/grafana.sh @@ -198,7 +198,7 @@ PUT -H "Content-Type: application/json;charset=UTF-8" -d \ \"oldPassword\": \"admin\", \"newPassword\": \"$GRAFANA_PASS\", \"confirmNew\": \"$GRAFANA_PASS\" -}" http://127.0.0.1:3000/api/user/password; echo "" +}" http://localhost:3000/api/user/password; echo "" echo " # Create InfluxDB datasource @@ -208,16 +208,16 @@ POST -H 'Content-Type: application/json;charset=UTF-8' -d \ '{ "name": "InfluxDB", "type": "influxdb", - "url": "http://127.0.0.1:8086", + "url": "http://localhost:8086", "access": "proxy", "isDefault": true, "database": "jitsi" -}' http://127.0.0.1:3000/api/datasources; echo "" +}' http://localhost:3000/api/datasources; echo "" echo " # Add Grafana Dashboard " -grafana_host="http://127.0.0.1:3000" +grafana_host="http://localhost:3000" grafana_cred="admin:$GRAFANA_PASS" grafana_datasource="InfluxDB" ds=(11969); -- 2.34.1 From 647bce26e64aff931b7cf7857b1b8270c1e5dacb Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 4 Jul 2024 00:08:46 -0600 Subject: [PATCH 4/6] Revert "return to localhost on most grafana." This reverts commit 1638096ba7cec9362d4afcf8788f589f16722ea1. --- grafana.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grafana.sh b/grafana.sh index f498e36..09f1e23 100644 --- a/grafana.sh +++ b/grafana.sh @@ -198,7 +198,7 @@ PUT -H "Content-Type: application/json;charset=UTF-8" -d \ \"oldPassword\": \"admin\", \"newPassword\": \"$GRAFANA_PASS\", \"confirmNew\": \"$GRAFANA_PASS\" -}" http://localhost:3000/api/user/password; echo "" +}" http://127.0.0.1:3000/api/user/password; echo "" echo " # Create InfluxDB datasource @@ -208,16 +208,16 @@ POST -H 'Content-Type: application/json;charset=UTF-8' -d \ '{ "name": "InfluxDB", "type": "influxdb", - "url": "http://localhost:8086", + "url": "http://127.0.0.1:8086", "access": "proxy", "isDefault": true, "database": "jitsi" -}' http://localhost:3000/api/datasources; echo "" +}' http://127.0.0.1:3000/api/datasources; echo "" echo " # Add Grafana Dashboard " -grafana_host="http://localhost:3000" +grafana_host="http://127.0.0.1:3000" grafana_cred="admin:$GRAFANA_PASS" grafana_datasource="InfluxDB" ds=(11969); -- 2.34.1 From 9753cf1bcb5fe62280b1c82d6825c658566d5784 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 4 Jul 2024 01:49:38 -0600 Subject: [PATCH 5/6] upgrade grafana nginx setup --- grafana.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/grafana.sh b/grafana.sh index 09f1e23..4e1e896 100644 --- a/grafana.sh +++ b/grafana.sh @@ -58,6 +58,7 @@ GRAFANA_INI="/etc/grafana/grafana.ini" DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" WS_CONF="/etc/nginx/sites-available/$DOMAIN.conf" WS_MATCH1="# ensure all static content can always be found first" +WS_MATCH2="upstream prosody {" GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)" # Min requirements @@ -179,10 +180,30 @@ while [ $secs -gt 0 ]; do done if [ -f "$WS_CONF" ]; then - sed -i "/$WS_MATCH1/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" "$WS_CONF" - sed -i "/$WS_MATCH1/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana." "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ location ~ ^/(grafana/|grafana/login) {" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF" sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF" sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ # Proxy Grafana Live WebSocket connections." "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ location /grafana/api/live/ {" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_http_version 1.1;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Upgrade \$http_upgrade;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Connection \$connection_upgrade;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_set_header Host \$host;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ \ \ proxy_pass http://grafana;" "$WS_CONF" + sed -i "/$WS_MATCH1/i \ \ \ \ }" "$WS_CONF" + + sed -i "/$WS_MATCH2/i # This is required to proxy Grafana Live WebSocket connections." "$WS_CONF" + sed -i "/$WS_MATCH2/i map \$http_upgrade \$connection_upgrade {" "$WS_CONF" + sed -i "/$WS_MATCH2/i \ \ default upgrade;" "$WS_CONF" + sed -i "/$WS_MATCH2/i \ \ '' close;" "$WS_CONF" + sed -i "/$WS_MATCH2/i }" "$WS_CONF" + sed -i "/$WS_MATCH1/i \\\n" "$WS_CONF" + sed -i "/$WS_MATCH2/i upstream grafana {" "$WS_CONF" + sed -i "/$WS_MATCH2/i \ \ server localhost:3000;" "$WS_CONF" + sed -i "/$WS_MATCH2/i }" "$WS_CONF" systemctl restart nginx else echo "No app configuration done to server file, please report to: -- 2.34.1 From 8ff04e8850ea8c544e44ce2c13e88f61eb42a616 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Thu, 4 Jul 2024 02:29:52 -0600 Subject: [PATCH 6/6] update brandless svg watermark2 file and replace favicon. --- images/watermark2.svg | 58 +------------------------------------------ jm-bm.sh | 4 ++- 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/images/watermark2.svg b/images/watermark2.svg index 92f632b..08ec906 100644 --- a/images/watermark2.svg +++ b/images/watermark2.svg @@ -1,57 +1 @@ - - - - - - - - - - - + \ No newline at end of file diff --git a/jm-bm.sh b/jm-bm.sh index 0140ad3..58b5c10 100644 --- a/jm-bm.sh +++ b/jm-bm.sh @@ -27,7 +27,7 @@ BUNDLE_JS="/usr/share/jitsi-meet/libs/app.bundle.min.js" # JM_IMG_PATH="/usr/share/jitsi-meet/images" WTM2_PATH="$JM_IMG_PATH/watermark2.png" -WTM2_SVG_PATH="$JM_IMG_PATH/watermark2.png" +WTM2_SVG_PATH="$JM_IMG_PATH/watermark2.svg" FICON_PATH="$JM_IMG_PATH/favicon2.ico" REC_ICON_PATH="$JM_IMG_PATH/gnome_record.png" # @@ -74,6 +74,8 @@ if ! grep -q ".leftwatermark{display:none" "$CSS_FILE" ; then fi #Replace App logo sed -i "s|// defaultLogoUrl: .*| defaultLogoUrl: 'images/watermark2.svg',|" "$MEET_CONF" +#Overwrite favicon svg +cp images/watermark2.svg $JM_IMG_PATH/favicon.svg #Customize room title sed -i "s|Jitsi Meet|$APP_NAME|g" "$TITLE_FILE" -- 2.34.1