From bdccfbe84c2e596f4e4f46c8282e5afc67303429 Mon Sep 17 00:00:00 2001 From: Ama Date: Wed, 24 Sep 2025 16:44:13 +0200 Subject: [PATCH] export function for rdl_prometheus --- programs/rdl_ssh_touch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/rdl_ssh_touch b/programs/rdl_ssh_touch index e57471f..97e8d1c 100644 --- a/programs/rdl_ssh_touch +++ b/programs/rdl_ssh_touch @@ -14,6 +14,8 @@ try_connection() { timeout 20 ssh "$login" touch "$file" } +export -f try_connection + should_reset() { last_run=$(< /var/rdl_ssh_touch/"$login") @@ -32,6 +34,8 @@ should_reset() { fi } + + if ! rdl_prometheus try_connection; then echo Can\'t ssh "$login" touch "$file". if should_reset; then