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