From ad0405d94cb0921dde1280c108b32f542b42eef4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Nov 2016 17:32:51 +0000 Subject: [PATCH] Ensure that upgrades don't reinstall google spyware --- src/freedombone-app-jitsi | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/freedombone-app-jitsi b/src/freedombone-app-jitsi index 0d50f973..296a96b0 100755 --- a/src/freedombone-app-jitsi +++ b/src/freedombone-app-jitsi @@ -51,6 +51,20 @@ jitsi_variables=(ONION_ONLY DEFAULT_DOMAIN_NAME MY_USERNAME) +function jitsi_disable_google_spyware { + # Presumably they included Google Analytics for benign reasons, but it's + # an obvious security problem. This should disable it. + sed -i "s|Google Analytics|Google Spyware deactivated|g" /usr/share/jitsi-meet/analytics.js + sed -i "s|www.google-analytics.com|${JITSI_DOMAIN_NAME}|g" /usr/share/jitsi-meet/analytics.js + sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/analytics.js + sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/analytics.js + + sed -i "s|Google Analytics|Google Spyware deactivated|g" /usr/share/jitsi-meet/libs/analytics.js + sed -i "s|www.google-analytics.com|${JITSI_DOMAIN_NAME}|g" /usr/share/jitsi-meet/libs/analytics.js + sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/libs/analytics.js + sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/libs/analytics.js +} + function change_password_jitsi { echo -n '' } @@ -117,7 +131,7 @@ function reconfigure_jitsi { } function upgrade_jitsi { - echo -n '' + jitsi_disable_google_spyware } function backup_local_jitsi { @@ -197,20 +211,6 @@ function remove_jitsi { remove_ddns_domain $JITSI_DOMAIN_NAME } -function jitsi_disable_google_spyware { - # Presumably they included Google Analytics for benign reasons, but it's - # an obvious security problem. This should disable it. - sed -i "s|Google Analytics|Google Spyware deactivated|g" /usr/share/jitsi-meet/analytics.js - sed -i "s|www.google-analytics.com|${JITSI_DOMAIN_NAME}|g" /usr/share/jitsi-meet/analytics.js - sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/analytics.js - sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/analytics.js - - sed -i "s|Google Analytics|Google Spyware deactivated|g" /usr/share/jitsi-meet/libs/analytics.js - sed -i "s|www.google-analytics.com|${JITSI_DOMAIN_NAME}|g" /usr/share/jitsi-meet/libs/analytics.js - sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/libs/analytics.js - sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/libs/analytics.js -} - function install_jitsi { if [[ "$(can_install_videobridge)" == "0" ]]; then echo $'jitsi meet/videobridge can only be installed on i386 or amd64 architectures'