From ccba4248d37dd9382e3228d5bb2387198f301f04 Mon Sep 17 00:00:00 2001 From: Ark74 Date: Fri, 2 Jul 2021 16:47:51 -0500 Subject: [PATCH] Move alias and configurations above room overwrite --- etherpad-docker.sh | 16 ++++++++-------- grafana.sh | 8 ++++---- quick_jibri_installer.sh | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/etherpad-docker.sh b/etherpad-docker.sh index d3719c0..5fabaac 100644 --- a/etherpad-docker.sh +++ b/etherpad-docker.sh @@ -104,14 +104,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 "/Anything that didn't match above/i \ \ \ \ #Etherpad block" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ location \^\~\ \/etherpad\/ {" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:9001\/;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header X-Forwarded-For \$remote_addr;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_buffering off;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_set_header Host \$host;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF - sed -i "/Anything that didn't match above/i \\\n" $WS_CONF + 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 else echo "> No etherpad config done to server file, please report to: -> https://github.com/switnet-ltd/quick-jibri-installer/issues" diff --git a/grafana.sh b/grafana.sh index 2fb7419..852d6fb 100644 --- a/grafana.sh +++ b/grafana.sh @@ -163,10 +163,10 @@ while [ $secs -gt 0 ]; do done if [ -f $WS_CONF ]; then - sed -i "/Anything that didn't match above/i \ \ \ \ location \~ \^\/(grafana\/|grafana\/login) {" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:3000;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF - sed -i "/Anything that didn't match above/i \\\n" $WS_CONF + 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 systemctl restart nginx else echo "No app configuration done to server file, please report to: diff --git a/quick_jibri_installer.sh b/quick_jibri_installer.sh index 4ea5bc9..2c42137 100644 --- a/quick_jibri_installer.sh +++ b/quick_jibri_installer.sh @@ -1058,11 +1058,11 @@ sed -i "s|MJS_USER_PASS=.*|MJS_USER_PASS=\"$MJS_USER_PASS\"|" add-jvb2-node.sh #Tune webserver for Jitsi App control if [ -f $WS_CONF ]; then - sed -i "/Anything that didn't match above/i \\\n" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ location = \/external_api.min.js {" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ \ \ \ \ alias \/usr\/share\/jitsi-meet\/libs\/external_api.min.js;" $WS_CONF - sed -i "/Anything that didn't match above/i \ \ \ \ }" $WS_CONF - sed -i "/Anything that didn't match above/i \\\n" $WS_CONF + sed -i "/# ensure all static content can always be found first/i \\\n" $WS_CONF + sed -i "/# ensure all static content can always be found first/i \ \ \ \ location = \/external_api.min.js {" $WS_CONF + sed -i "/# ensure all static content can always be found first/i \ \ \ \ \ \ \ \ alias \/usr\/share\/jitsi-meet\/libs\/external_api.min.js;" $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 systemctl reload nginx else echo "No app configuration done to server file, please report to: