„archive_rotate.sh“ ändern

This commit is contained in:
Stephan 2022-01-01 18:42:13 +00:00
parent 2e095dc4be
commit 5c6045a5a1
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ return
IntervallHours=1
printf "\n---------------------------------------------------------------------------\n"
[ ! -d "${DummyDir}" ] && echo "DummyDir is not a valid directory - EXIT" && exit 1
# [ ! -d "${DummyDir}" ] && echo "DummyDir is not a valid directory - EXIT" && exit 1
[ ! -d "${DummyDir}" ] && echo "DummyDir is not a valid directory - create it" && mkdir -p "$DummyDir"
houre_array=($(seq -s " " 1 ${IntervallHours} ${MaxHours}))
for houre in ${houre_array[@]}; do
touch -t $(date -d "-${houre} hours" +%Y%m%d%H%M) "${DummyDir}/$(date -d "-${houre} hours" +%Y-%m-%d_%H-%M).dummy"