borg2-backup.sh: Fix error..
This commit is contained in:
@ -6,9 +6,9 @@ working_dir="$(dirname $(realpath $0))"
|
|||||||
conf_file="${working_dir}/conf/${script_name%%.*}.conf"
|
conf_file="${working_dir}/conf/${script_name%%.*}.conf"
|
||||||
|
|
||||||
LOCK_DIR="/tmp/${script_name%%.*}.LOCK"
|
LOCK_DIR="/tmp/${script_name%%.*}.LOCK"
|
||||||
#log_file="${LOCK_DIR}/${script_name%%.*}.log"
|
log_file="${LOCK_DIR}/${script_name%%.*}.log"
|
||||||
|
|
||||||
lock_file="${LOCK_DIR}/${script_name%%.*}.log"
|
#lock_file="${LOCK_DIR}/${script_name%%.*}.log"
|
||||||
|
|
||||||
backup_date="$(date +%Y-%m-%d-%H%M)"
|
backup_date="$(date +%Y-%m-%d-%H%M)"
|
||||||
|
|
||||||
@ -983,7 +983,7 @@ declare -i _ret_val=$?
|
|||||||
if [[ ${_ret_val} -gt 0 ]] ; then
|
if [[ ${_ret_val} -gt 0 ]] ; then
|
||||||
echo_failed
|
echo_failed
|
||||||
cat ${log_file} >> "${BORG_LOG_FILE}"
|
cat ${log_file} >> "${BORG_LOG_FILE}"
|
||||||
error "_ret_val: ${_ret_val}\n$(cat "${log_file}")"
|
error -e "_ret_val: ${_ret_val}\n$(cat "${log_file}")"
|
||||||
else
|
else
|
||||||
echo_ok
|
echo_ok
|
||||||
cat ${log_file} >> ${BORG_LOG_FILE}
|
cat ${log_file} >> ${BORG_LOG_FILE}
|
||||||
|
Reference in New Issue
Block a user