Check if database password file exists

This commit is contained in:
Bob Mottram 2016-10-24 21:53:14 +01:00
parent b11d27c3e0
commit 036cbad80a
2 changed files with 8 additions and 2 deletions

View File

@ -66,7 +66,10 @@ if [ -f $COMPLETION_FILE ]; then
fi
# MariaDB password
DATABASE_PASSWORD=$(cat /root/dbpass)
DATABASE_PASSWORD=''
if [ -f /root/dbpass ]; then
DATABASE_PASSWORD=$(cat /root/dbpass)
fi
function check_backup_exists {
if [ ! -d $USB_MOUNT/backup ]; then

View File

@ -94,7 +94,10 @@ else
fi
# MariaDB password
DATABASE_PASSWORD=$(cat /root/dbpass)
DATABASE_PASSWORD=''
if [ -f /root/dbpass ]; then
DATABASE_PASSWORD=$(cat /root/dbpass)
fi
function copy_gpg_keys {
echo $"Copying GPG keys from admin user to root"