Browse Source

Remove bad links from riot

Bob Mottram 7 years ago
parent
commit
7b1e6b2df8
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/freedombone-app-riot

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

65
     echo '0'
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
 function install_interactive_riot {
74
 function install_interactive_riot {
69
     if [[ $ONION_ONLY != "no" ]]; then
75
     if [[ $ONION_ONLY != "no" ]]; then
70
         RIOT_DOMAIN_NAME='riot.local'
76
         RIOT_DOMAIN_NAME='riot.local'
177
 
183
 
178
     riot_download
184
     riot_download
179
     sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE}
185
     sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE}
186
+    riot_remove_bad_links
180
 
187
 
181
     systemctl restart nginx
188
     systemctl restart nginx
182
 }
189
 }
342
 
349
 
343
     chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
350
     chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
344
 
351
 
352
+    riot_remove_bad_links
345
     systemctl restart nginx
353
     systemctl restart nginx
346
 
354
 
347
     set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"
355
     set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"