Change borg repository verify error message collection

This commit is contained in:
Clemens Schwaighofer
2025-12-03 12:47:49 +09:00
parent f41dd1b723
commit 8a8de773df

View File

@@ -296,10 +296,10 @@ if [ "${VERIFY}" -eq 1 ] || [ "${INIT}" -eq 1 ]; then
printf "${PRINTF_SUB_BLOCK}" "VERIFY" "$(date +'%F %T')" "${MODULE}";
if [ -n "${TARGET_SERVER}" ]; then
if [ "${DEBUG}" -eq 1 ]; then
echo "${BORG_COMMAND} info ${OPT_REMOTE} ${REPOSITORY} 2>&1";
echo "${BORG_COMMAND} info ${OPT_REMOTE} ${REPOSITORY}";
fi;
# use borg info and verify if it returns "Repository ID:" in the first line
REPO_VERIFY=$(${BORG_COMMAND} info ${OPT_REMOTE} "${REPOSITORY}" 2>&1);
REPO_VERIFY=$(${BORG_COMMAND} info ${OPT_REMOTE} "${REPOSITORY}");
__LAST_ERROR=$?
if [ $__LAST_ERROR -ne 0 ]; then
echo "[!] Repository verify error: ${REPO_VERIFY}";