#!/bin/bash . ./test-common.sh cleanup 50 # ------------------------------- Test 50 ------------------------------------ # test that hourly rotation works properly preptest test.log 50 1 0 DATESTRING=$(/bin/date +%Y%m%d%H) NOW=$(/bin/date "+%Y-%-m-%-d-%-H" 2>/dev/null) HOURAGO=$(/bin/date "+%Y-%-m-%-d-%-H" --date "1 hour ago" 2>/dev/null) GNUDATE=$? # --force to trigger rotation $RLR test-config.50 --force checkoutput < test.log rm -f test.log-$DATESTRING $RLR test-config.50 checkoutput <