Set database password on hubzilla restore
This commit is contained in:
parent
f863c21860
commit
50c64e26ba
|
@ -13,7 +13,7 @@
|
||||||
# License
|
# 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
|
# 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
|
# 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
|
if [ -d $temp_restore_dir ]; then
|
||||||
rm -rf $temp_restore_dir
|
rm -rf $temp_restore_dir
|
||||||
fi
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,6 +283,11 @@ function restore_remote_hubzilla {
|
||||||
if [ -d /root/temphubzilla ]; then
|
if [ -d /root/temphubzilla ]; then
|
||||||
rm -rf /root/temphubzilla
|
rm -rf /root/temphubzilla
|
||||||
fi
|
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 {
|
function remove_hubzilla {
|
||||||
|
|
Loading…
Reference in New Issue