update script to use tee binary var

This commit is contained in:
Alex Kelly 2023-01-16 19:24:05 -05:00
parent 741725ba4e
commit f20625d391

View file

@ -102,7 +102,7 @@ if run_backup && restic unlock && run_forget && cleanup; then
ENDTIME=$(date "+%Y-%m-%d %H:%M:%S") ENDTIME=$(date "+%Y-%m-%d %H:%M:%S")
#status_total=$(( check_status + backup_status + forget_status )) #status_total=$(( check_status + backup_status + forget_status ))
#if (( status_total == 0 ));then #if (( status_total == 0 ));then
${ECHO} "Backup on $HOST completed successfully at $ENDTIME" | tee -a $LOG_FILE >(notify) ${ECHO} "Backup on $HOST completed successfully at $ENDTIME" | ${TEE} -a $LOG_FILE >(notify)
else else
${ECHO} "Backup on $HOST completed at $ENDTIME with issues (see $LOG_FILE)" | tee -a $LOG_FILE >(notify) ${ECHO} "Backup on $HOST completed at $ENDTIME with issues (see $LOG_FILE)" | ${TEE} -a $LOG_FILE >(notify)
fi fi