fix bug in syncHttpLogs causing them to fail

This commit is contained in:
Stephen Smoogen 2020-07-10 09:28:38 -04:00
parent 56288139bb
commit fdf96ef734
2 changed files with 5 additions and 1 deletions

View file

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

View file

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