refactor logging
All checks were successful
lint-test-helm / lint-helm (push) Successful in 10s
render-manifests-push / render-manifests-push (push) Successful in 22s
renovate / renovate (push) Successful in 47s

This commit is contained in:
2025-12-20 16:33:52 -06:00
parent fa4d55168d
commit c99c7affdd

View File

@@ -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