From 0daef0373f9c80442e4b639febf49711c257cae9 Mon Sep 17 00:00:00 2001 From: Antoine Lima Date: Tue, 4 Jan 2022 08:48:23 +0000 Subject: [PATCH] Replaced printf with a simple cat in runcron & runforget --- runcron | 4 ++-- runforget | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runcron b/runcron index 4b20e4e..74303cd 100755 --- a/runcron +++ b/runcron @@ -4,10 +4,10 @@ ret=$? if [ "$ret" != 0 ] || [ -s /tmp/autorestic-err.log ] then - printf "Command failed with return code $ret and log:\n$(cat /tmp/autorestic-err.log)" | mail -s "Autorestic Backup: Failed" root + cat <(echo -e "Command failed with return code $ret and log:") /tmp/autorestic-err.log | mail -s "Autorestic Backup: Failed" root else if [ $(wc -l < /tmp/autorestic.log) -gt 3 ] then - printf "Command successfully finished with the following log:\n$(cat /tmp/autorestic.log)" | mail -s "Autorestic Backup: Success" root + cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic.log | mail -s "Autorestic Backup: Success" root fi fi diff --git a/runforget b/runforget index 04e3f1e..be50f25 100755 --- a/runforget +++ b/runforget @@ -4,7 +4,7 @@ ret=$? if [ "$ret" != 0 ] || [ -s /tmp/autorestic-prune-err.log ] then - printf "Command failed with return code $ret and log:\n$(cat /tmp/autorestic-prune-err.log)" | mail -s "Autorestic Pruning: Failed" root + cat <(echo -e "Command failed with return code $ret and log:") /tmp/autorestic-prune-err.log | mail -s "Autorestic Pruning: Failed" root else - printf "Command successfully finished with the following log:\n$(cat /tmp/autorestic-prune.log)" | mail -s "Autorestic Pruning: Success" root -fi \ No newline at end of file + cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic-prune.log | mail -s "Autorestic Pruning: Success" root +fi