From c99c7affdd2bce319fa7e49f4b6cd4674cf65c8b Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 20 Dec 2025 16:33:52 -0600 Subject: [PATCH] refactor logging --- clusters/cl01tl/helm/talos/templates/config.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clusters/cl01tl/helm/talos/templates/config.yaml b/clusters/cl01tl/helm/talos/templates/config.yaml index 69b47149d..6b5954f4e 100644 --- a/clusters/cl01tl/helm/talos/templates/config.yaml +++ b/clusters/cl01tl/helm/talos/templates/config.yaml @@ -19,13 +19,13 @@ data: echo " "; echo ">> Configured Date Range is $(date -u -d @${DATE_RANGE_SECONDS} +"%j days, %H hours, %M minutes")"; echo ">> Backups prior to '$DATE_RANGE' will be removed"; - echo " "; - echo ">> Backups to be removed:"; - $FILES=$(s3cmd ls --no-check-certificate ${BUCKET}/cl01tl/etcd/ | + FILES=$(s3cmd ls --no-check-certificate ${BUCKET}/cl01tl/etcd/ | awk -v file_match="$FILE_MATCH" '$4 < file_match {print $4}'); - echo "$FILES" if [ -n "${FILES}" ]; then + echo " "; + echo ">> Backups to be removed:"; + echo "$FILES" echo " "; echo ">> Deleting ..."; $FILES | while read file; do @@ -35,6 +35,9 @@ data: echo ">> Detected error, will send message to ntfy"; fi; done; + else + echo " "; + echo ">> No backups remove"; fi; if [ "$ERROR" = "true" ]; then