Replaced printf with a simple cat in runcron & runforget
This commit is contained in:
parent
dc8e5cf27d
commit
0daef0373f
4
runcron
4
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user