Replaced printf with a simple cat in runcron & runforget

This commit is contained in:
Antoine Lima 2022-01-04 08:48:23 +00:00
parent dc8e5cf27d
commit 0daef0373f
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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
cat <(echo -e "Command successfully finished with the following log:") /tmp/autorestic-prune.log | mail -s "Autorestic Pruning: Success" root
fi