From cb5c13d0fc12c412d8f96d4c7e7f4d9f5f89d2c6 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 20 Dec 2025 17:58:07 -0600 Subject: [PATCH] add error handling of check command --- clusters/cl01tl/helm/talos/templates/config.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clusters/cl01tl/helm/talos/templates/config.yaml b/clusters/cl01tl/helm/talos/templates/config.yaml index 8eb3499d5..51bc857df 100644 --- a/clusters/cl01tl/helm/talos/templates/config.yaml +++ b/clusters/cl01tl/helm/talos/templates/config.yaml @@ -22,7 +22,11 @@ data: FILES=$(s3cmd ls --no-check-certificate ${BUCKET}/cl01tl/etcd/ | awk -v file_match="$FILE_MATCH" '$4 < file_match {print $4}'); - if [ -n "${FILES}" ]; then + if [ $? -ne 0 ]; then + ERROR=true; + echo " "; + echo ">> Detected error, will send message to ntfy"; + elif [ -n "${FILES}" ]; then echo " "; echo ">> Backups to be removed:"; echo "$FILES"