Verify borg SSH keyfile exists

This commit is contained in:
Asif Bacchus 2018-10-14 06:24:37 -06:00
parent ad18770f05
commit b41a25c94c
1 changed files with 8 additions and 0 deletions

View File

@ -442,6 +442,14 @@ if [ -z "${borgConfig[1]}" ]; then
cleanup
quit 211
else
checkExist ff "${borgConfig[1]}"
checkResult="$?"
if [ "$checkResult" = 1 ]; then
# SSH keyfile specified could not be found
cleanup
quit 211
fi
echo -e "${op}${stamp} Borg SSH key... OK${normal}" >> "$logFile"
export BORG_RSH="ssh -i ${borgConfig[1]}"
fi
# check: name of borg repo