From 968a927fe576370f2a5abae854b9a263ae524fd9 Mon Sep 17 00:00:00 2001 From: kx1t Date: Tue, 23 Jul 2024 15:38:37 -0400 Subject: [PATCH] better logging --- rootfs/etc/s6-overlay/scripts/cleanup_globe_history | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/s6-overlay/scripts/cleanup_globe_history b/rootfs/etc/s6-overlay/scripts/cleanup_globe_history index 536692e..bfd5031 100755 --- a/rootfs/etc/s6-overlay/scripts/cleanup_globe_history +++ b/rootfs/etc/s6-overlay/scripts/cleanup_globe_history @@ -30,10 +30,11 @@ fi 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 if (( $(date -d "$dir" +%s) < cutoffepoch )); then rm -rf "/var/globe_history/$dir" fi done - +"${s6wrap[@]}" echo "Done - next purge will be in 24 hours" exec sleep 24h