Verify borg SSH keyfile exists

This commit is contained in:
Asif Bacchus 2018-10-14 06:24:37 -06:00
parent ad18770f05
commit b41a25c94c

View File

@ -442,6 +442,14 @@ if [ -z "${borgConfig[1]}" ]; then
cleanup cleanup
quit 211 quit 211
else 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]}" export BORG_RSH="ssh -i ${borgConfig[1]}"
fi fi
# check: name of borg repo # check: name of borg repo