Set database password on movim restore
This commit is contained in:
parent
86d1c1a7d3
commit
e279bce875
|
@ -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
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# License
|
# License
|
||||||
# =======
|
# =======
|
||||||
#
|
#
|
||||||
# Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
|
# Copyright (C) 2016-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
|
||||||
|
|
|
@ -216,6 +216,11 @@ function restore_local_movim {
|
||||||
rm -rf $temp_restore_dir
|
rm -rf $temp_restore_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
||||||
|
cd /var/www/$MOVIM_DOMAIN_NAME/htdocs/config
|
||||||
|
sed -i "s|'password'.*|'password' => '$MARIADB_PASSWORD',|g" db.inc.php
|
||||||
|
MARIADB_PASSWORD=
|
||||||
|
|
||||||
echo $"Restore of movim complete"
|
echo $"Restore of movim complete"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -259,6 +264,12 @@ function restore_remote_movim {
|
||||||
if [ -d /root/tempmovim ]; then
|
if [ -d /root/tempmovim ]; then
|
||||||
rm -rf /root/tempmovim
|
rm -rf /root/tempmovim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MARIADB_PASSWORD=$(${PROJECT_NAME}-pass -u root -a mariadb)
|
||||||
|
cd /var/www/$MOVIM_DOMAIN_NAME/htdocs/config
|
||||||
|
sed -i "s|'password'.*|'password' => '$MARIADB_PASSWORD',|g" db.inc.php
|
||||||
|
MARIADB_PASSWORD=
|
||||||
|
|
||||||
echo $"Restore of movim complete"
|
echo $"Restore of movim complete"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue