diff --git a/roles/base/files/syncHttpLogs.sh b/roles/base/files/syncHttpLogs.sh index 600a6814da..cafdede795 100644 --- a/roles/base/files/syncHttpLogs.sh +++ b/roles/base/files/syncHttpLogs.sh @@ -26,6 +26,7 @@ function syncHttpLogs { /usr/bin/rsync $RSYNC_FLAGS $HOST::log/httpd/$f ./$DEST &> /dev/null if [[ $? -ne 0 ]]; then echo "rsync from $HOST for file $f failed" + fi done done } diff --git a/roles/base/templates/syncHttpLogs.sh.j2 b/roles/base/templates/syncHttpLogs.sh.j2 index bf9bae84f4..0735436875 100644 --- a/roles/base/templates/syncHttpLogs.sh.j2 +++ b/roles/base/templates/syncHttpLogs.sh.j2 @@ -23,7 +23,10 @@ function syncHttpLogs { for f in $(/usr/bin/rsync $RSYNC_FLAGS --list-only $HOST::log/httpd/*$YESTERDAY* | awk '{ print $5 }') do DEST=$(echo $f | /bin/sed s/-$YESTERDAY//) - /usr/bin/rsync $RSYNC_FLAGS $HOST::log/httpd/$f ./$DEST + /usr/bin/rsync $RSYNC_FLAGS $HOST::log/httpd/$f ./$DEST &> /dev/null + if [[ $? -ne 0 ]]; then + echo "rsync from $HOST for file $f failed" + fi done done }