diff --git a/src/freedombone-app-jitsi b/src/freedombone-app-jitsi index 296a96b0..0f154f06 100755 --- a/src/freedombone-app-jitsi +++ b/src/freedombone-app-jitsi @@ -56,13 +56,21 @@ function jitsi_disable_google_spyware { # 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 + if ! grep '//ga(' /usr/share/jitsi-meet/analytics.js; then + sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/analytics.js + fi + if ! grep '//action +' /usr/share/jitsi-meet/analytics.js; then + sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/analytics.js + fi 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 + if ! grep '//ga(' /usr/share/jitsi-meet/libs/analytics.js; then + sed -i 's|ga(|//ga(|g' /usr/share/jitsi-meet/libs/analytics.js + fi + if ! grep '//action +' /usr/share/jitsi-meet/libs/analytics.js; then + sed -i 's|action +|//action +|g' /usr/share/jitsi-meet/libs/analytics.js + fi } function change_password_jitsi {