From 4e67ef53947fcbfa7843444f033974ed3b7103cc Mon Sep 17 00:00:00 2001 From: shmick Date: Fri, 24 Nov 2023 20:09:34 +0200 Subject: [PATCH] Remove Prometheus file after 5 minutes; remove inotify dependency --- .kumonoboru | 2 +- kumonoboru.sh | 9 ++++++++- kumonoboru.yaml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.kumonoboru b/.kumonoboru index 64786a5..efa4a62 100644 --- a/.kumonoboru +++ b/.kumonoboru @@ -1,3 +1,3 @@ Gerbil-TK /var/Red-Vol/Media/Pictures Pukeko-XYZ-Containers /var/Red-Vol/Media/Containers -Pukeko-XYZ-Cloud /var/Red-Vol/Media/Could +Pukeko-XYZ-Cloud /var/Red-Vol/Media/Cloud diff --git a/kumonoboru.sh b/kumonoboru.sh index 222622b..2371ce8 100755 --- a/kumonoboru.sh +++ b/kumonoboru.sh @@ -192,4 +192,11 @@ for repo in "${!REPOS[@]}"; do fi done -echo "All done; have a nice day!" \ No newline at end of file +echo "All done; have a nice day!" + +## Once the script finishes, the .prom file will live on for 2 minutes before being deleted. +#+ This allows Prometheus to pick up the alert, send out a notification, and move on with its life. +( + sleep 120 + rm $PROM_FILE +) 2>1 >/dev/null & diff --git a/kumonoboru.yaml b/kumonoboru.yaml index 2d1afb9..7274a9c 100644 --- a/kumonoboru.yaml +++ b/kumonoboru.yaml @@ -6,7 +6,7 @@ ansible_sudo_pass: "{{ ANSIBLE_SUDO_PASS }}" tasks: - - name: Install Restic + - name: Install dependencies ansible.builtin.package: name: restic state: latest