data als funktion

This commit is contained in:
Michael Grote 2021-09-21 21:00:08 +02:00
parent 467dff3ca0
commit 7e99273341

View file

@ -58,6 +58,10 @@ function check_sshpass {
exit 1
fi
}
function get_data {
# hole daten per ssh
data=$(sshpass -p $ssh_password ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $ssh_user@$ssh_host -q ':delay 6s; /system health print; /system resource print; /system resource cpu print; /system identity print')
}
function get_voltage_label {
while read -r line; do # für jede zeile in... ; siehe "done"
@ -296,8 +300,7 @@ function get_memory_value {
# rufe funktionen auf, reihenfolge ist wichtig
check_sshpass
# hole daten per ssh
data=$(sshpass -p $ssh_password ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $ssh_user@$ssh_host -q ':delay 6s; /system health print; /system resource print; /system resource cpu print; /system identity print')
get_data
get_name
get_cpu_count