This commit is contained in:
Bob Mottram 2016-11-21 10:51:48 +00:00
parent 24e7f3b972
commit d27efc5dba
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ function get_mariadb_password {
if [ -f $DATABASE_PASSWORD_FILE ]; then if [ -f $DATABASE_PASSWORD_FILE ]; then
MARIADB_PASSWORD=$(cat $DATABASE_PASSWORD_FILE) MARIADB_PASSWORD=$(cat $DATABASE_PASSWORD_FILE)
${PROJECT_NAME}-pass -u root -a mariadb -p "$MARIADB_PASSWORD" ${PROJECT_NAME}-pass -u root -a mariadb -p "$MARIADB_PASSWORD"
if [[ "$(${PROJECT_NAME}-pass -u root -a mariadb)" == "$MARIADB_PASSWORD" ]]; then stored_password=$(${PROJECT_NAME}-pass -u root -a mariadb)
if [[ "$stored_password" == "$MARIADB_PASSWORD" ]]; then
shred -zu $DATABASE_PASSWORD_FILE shred -zu $DATABASE_PASSWORD_FILE
echo $'MariaDB password moved into password store' echo $'MariaDB password moved into password store'
return return