From 3790d2017911439a8ff67c75b59b4143046a69c5 Mon Sep 17 00:00:00 2001 From: Younes Ichiche Date: Sat, 27 Nov 2021 10:00:00 +0100 Subject: [PATCH] remove double catch function --- plugins/router/mikrotik_system | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/plugins/router/mikrotik_system b/plugins/router/mikrotik_system index 7669543a..fa00afd3 100755 --- a/plugins/router/mikrotik_system +++ b/plugins/router/mikrotik_system @@ -88,20 +88,6 @@ function get_cpu_count { fi done <<< "$data" } -catch() -{ -eval "$({ -__2="$( - { __1="$("${@:3}")"; } 2>&1; - ret=$?; - printf '%q=%q\n' "$1" "$__1" >&2; - exit $ret - )"; -ret="$?"; -printf '%s=%q\n' "$2" "$__2" >&2; -printf '( exit %q )' "$ret" >&2; -} 2>&1 )"; -} function get_data { # hole daten per ssh catch data stderr sshpass -p "$ssh_password" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_user"@"$ssh_host" ':delay 6s; /system health print; /system resource print; /system resource cpu print; /system identity print'