Remove bad links from riot

This commit is contained in:
Bob Mottram 2018-01-20 13:13:31 +00:00
parent b72da11f6c
commit 7b1e6b2df8
1 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,12 @@ function add_user_riot {
echo '0' 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 { function install_interactive_riot {
if [[ $ONION_ONLY != "no" ]]; then if [[ $ONION_ONLY != "no" ]]; then
RIOT_DOMAIN_NAME='riot.local' RIOT_DOMAIN_NAME='riot.local'
@ -177,6 +183,7 @@ function upgrade_riot {
riot_download riot_download
sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE} sed -i "s|riot version.*|riot version:$RIOT_VERSION|g" ${COMPLETION_FILE}
riot_remove_bad_links
systemctl restart nginx systemctl restart nginx
} }
@ -342,6 +349,7 @@ function install_riot {
chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
riot_remove_bad_links
systemctl restart nginx systemctl restart nginx
set_completion_param "riot domain" "$RIOT_DOMAIN_NAME" set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"