fix borgSSHKey test, check for file not dir

This commit is contained in:
Asif Bacchus 2019-06-18 21:38:44 -06:00
parent 249209df99
commit 3fd8da1e26

View File

@ -455,7 +455,7 @@ export BORG_BASE_DIR="${borgBaseDir%/}"
## check path to SSH keyfile ## check path to SSH keyfile
if [ -z "${borgSSHKey}" ]; then if [ -z "${borgSSHKey}" ]; then
badDetails empty 'borgSSHKey' badDetails empty 'borgSSHKey'
elif [ ! -d "${borgSSHKey}" ]; then elif [ ! -f "${borgSSHKey}" ]; then
badDetails dne 'borgSSHKey' badDetails dne 'borgSSHKey'
fi fi
printf "${magenta}details:borgSSHKey ${norm}-- ${ok}[OK]${norm}\n" \ printf "${magenta}details:borgSSHKey ${norm}-- ${ok}[OK]${norm}\n" \