export function for rdl_prometheus
This commit is contained in:
parent
e0afa21640
commit
bdccfbe84c
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue