mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
remove double catch function
This commit is contained in:
parent
144f333cf0
commit
3790d20179
1 changed files with 0 additions and 14 deletions
|
@ -88,20 +88,6 @@ function get_cpu_count {
|
||||||
fi
|
fi
|
||||||
done <<< "$data"
|
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 {
|
function get_data {
|
||||||
# hole daten per ssh
|
# 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'
|
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'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue