diff options
author | lookshe <github@lookshe.org> | 2014-09-12 11:07:35 +0200 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2014-09-12 11:07:35 +0200 |
commit | 3ad89747300d526bcab402095a78564d8426eb34 (patch) | |
tree | ff3819919990739572e37656a1e0766fb2d6c060 | |
parent | e848de475ed73d71050980a6d3b3b59271c53344 (diff) |
logfile was only written on connection errors and not as planned if there were no errors
-rwxr-xr-x | backup.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -46,7 +46,7 @@ function rsync_server { echo "$filefrom" | grep ".month." > /dev/null 2>&1 ret2=$? # on monthly backups and connection errors there should be no update of logfile - if [ $ret2 -ne 0 -a $ret -ne 0 ] + if [ $ret2 -ne 0 -a $ret -e 0 ] then sed -e "s/^$logfileentry .*$/${logfileentry} $backup_time/" "$logfile" > "$logfile.tmp" mv -f "$logfile.tmp" "$logfile" |