Sfoglia il codice sorgente

Remove bad links from riot

Bob Mottram 7 anni fa
parent
commit
7b1e6b2df8
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8
    0
      src/freedombone-app-riot

+ 8
- 0
src/freedombone-app-riot Vedi File

@@ -65,6 +65,12 @@ function add_user_riot {
65 65
     echo '0'
66 66
 }
67 67
 
68
+function riot_remove_bad_links {
69
+    # We should not need to be depending on sites that we don't control
70
+    sed -i 's|https://piwik.riot.im/||g' /var/www/$RIOT_DOMAIN_NAME/htdocs/config.json
71
+    sed -i '/riot.im/d' /var/www/$RIOT_DOMAIN_NAME/htdocs/home.html
72
+}
73
+
68 74
 function install_interactive_riot {
69 75
     if [[ $ONION_ONLY != "no" ]]; then
70 76
         RIOT_DOMAIN_NAME='riot.local'
@@ -177,6 +183,7 @@ function upgrade_riot {
177 183
 
178 184
     riot_download
179 185
     sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE}
186
+    riot_remove_bad_links
180 187
 
181 188
     systemctl restart nginx
182 189
 }
@@ -342,6 +349,7 @@ function install_riot {
342 349
 
343 350
     chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
344 351
 
352
+    riot_remove_bad_links
345 353
     systemctl restart nginx
346 354
 
347 355
     set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"