Start removing bad links #69

This commit is contained in:
Bob Mottram 2017-12-18 13:57:51 +00:00
parent e4734b6ef7
commit 0e337558e6
1 changed files with 9 additions and 0 deletions

View File

@ -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