data als funktion
This commit is contained in:
parent
467dff3ca0
commit
7e99273341
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue