Set database password on hubzilla restore

This commit is contained in:
Bob Mottram 2017-06-25 20:39:44 +01:00
parent f863c21860
commit 50c64e26ba
1 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -243,6 +243,11 @@ function restore_local_hubzilla {
if [ -d $temp_restore_dir ]; then
rm -rf $temp_restore_dir
fi
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs
sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $HUBZILLA_PATH/.htconfig.php
MARIADB_PASSWORD=
fi
}
@ -278,6 +283,11 @@ function restore_remote_hubzilla {
if [ -d /root/temphubzilla ]; then
rm -rf /root/temphubzilla
fi
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs
sed -i "s|\$db_pass =.*|\$db_pass = '${MARIADB_PASSWORD}';|g" $HUBZILLA_PATH/.htconfig.php
MARIADB_PASSWORD=
}
function remove_hubzilla {