From 0e337558e65c6ebfae807dcd4eb57818e1d8dd85 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 18 Dec 2017 13:57:51 +0000 Subject: [PATCH] Start removing bad links #69 --- src/freedombone-app-fedwiki | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index cbb9c0ed..02766eb2 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -48,6 +48,12 @@ fedwiki_variables=(FEDWIKI_DOMAIN_NAME MY_USERNAME MY_EMAIL_ADDRESS) +function fedwiki_remove_bad_links { + if [ -f /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js ]; then + sed -i 's|maxcdn.bootstrapcdn.com|localhost|g' /usr/local/lib/node_modules/wiki/node_modules/wiki-security-friends/client/security.js + fi +} + function logging_on_fedwiki { echo -n '' } @@ -109,6 +115,7 @@ function upgrade_fedwiki { systemctl stop fedwiki npm upgrade -g wiki@$FEDWIKI_VERSION + fedwiki_remove_bad_links chown -R fedwiki:fedwiki $FEDWIKI_DATA systemctl start fedwiki @@ -388,6 +395,8 @@ function install_fedwiki { function_check add_ddns_domain add_ddns_domain $FEDWIKI_DOMAIN_NAME + fedwiki_remove_bad_links + systemctl enable fedwiki systemctl daemon-reload systemctl start fedwiki