From 7b1e6b2df8d7762c48d2007dc7f6fae3d11c9b5a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 20 Jan 2018 13:13:31 +0000 Subject: [PATCH] Remove bad links from riot --- src/freedombone-app-riot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-app-riot b/src/freedombone-app-riot index 2ed55775..65df8747 100755 --- a/src/freedombone-app-riot +++ b/src/freedombone-app-riot @@ -65,6 +65,12 @@ function add_user_riot { echo '0' } +function riot_remove_bad_links { + # We should not need to be depending on sites that we don't control + sed -i 's|https://piwik.riot.im/||g' /var/www/$RIOT_DOMAIN_NAME/htdocs/config.json + sed -i '/riot.im/d' /var/www/$RIOT_DOMAIN_NAME/htdocs/home.html +} + function install_interactive_riot { if [[ $ONION_ONLY != "no" ]]; then RIOT_DOMAIN_NAME='riot.local' @@ -177,6 +183,7 @@ function upgrade_riot { riot_download sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE} + riot_remove_bad_links systemctl restart nginx } @@ -342,6 +349,7 @@ function install_riot { chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs + riot_remove_bad_links systemctl restart nginx set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"