mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-10-16 13:50:46 +00:00
better logging
This commit is contained in:
parent
04a059139c
commit
968a927fe5
1 changed files with 2 additions and 1 deletions
|
@ -30,10 +30,11 @@ fi
|
||||||
|
|
||||||
cutoffepoch="$(date -d"-${MAX_GLOBE_HISTORY} days" +%s)"
|
cutoffepoch="$(date -d"-${MAX_GLOBE_HISTORY} days" +%s)"
|
||||||
|
|
||||||
|
"${s6wrap[@]}" echo "Purging globe_history older than $MAX_GLOBE_HISTORY days (before $(date -d"-${MAX_GLOBE_HISTORY} days" +%d-%b-%Y))"
|
||||||
for dir in $(find /var/globe_history -maxdepth 3 -mindepth 3 | grep -o -E -e '[0-9]{4}/[0-9]{2}/[0-9]{2}$'); do
|
for dir in $(find /var/globe_history -maxdepth 3 -mindepth 3 | grep -o -E -e '[0-9]{4}/[0-9]{2}/[0-9]{2}$'); do
|
||||||
if (( $(date -d "$dir" +%s) < cutoffepoch )); then
|
if (( $(date -d "$dir" +%s) < cutoffepoch )); then
|
||||||
rm -rf "/var/globe_history/$dir"
|
rm -rf "/var/globe_history/$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
"${s6wrap[@]}" echo "Done - next purge will be in 24 hours"
|
||||||
exec sleep 24h
|
exec sleep 24h
|
||||||
|
|
Loading…
Reference in a new issue