check bc
This commit is contained in:
parent
7e99273341
commit
605635b05b
1 changed files with 7 additions and 1 deletions
|
@ -27,7 +27,6 @@
|
|||
# - [ ] linter
|
||||
# - [ ] diagramm erklärungen label
|
||||
# - [ ] doku depencies
|
||||
# - [ ] check bc
|
||||
# - [ ] doku für munin mit ==HEAD usw.
|
||||
|
||||
# setze Variablen mit default-Werten
|
||||
|
@ -58,6 +57,12 @@ function check_sshpass {
|
|||
exit 1
|
||||
fi
|
||||
}
|
||||
function check_bc {
|
||||
if [[ $(dpkg -l bc > /dev/null 2>&1) -ne "0" ]] ; then
|
||||
echo "could not find bc"
|
||||
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')
|
||||
|
@ -300,6 +305,7 @@ function get_memory_value {
|
|||
|
||||
# rufe funktionen auf, reihenfolge ist wichtig
|
||||
check_sshpass
|
||||
check_bc
|
||||
get_data
|
||||
get_name
|
||||
get_cpu_count
|
||||
|
|
Loading…
Reference in a new issue