ssh delay weg

This commit is contained in:
Michael Grote 2021-09-19 19:57:20 +02:00
parent 41414be67e
commit ce53d58efc

View file

@ -12,7 +12,6 @@
# env.ssh_password hallowelt
# env.ssh_host 192.168.2.1
# env.name hex
# env.ssh_delay <n>s
# on the router
# /user add name=munin group=read password=hallowelt address=<munin-server-ip>
@ -23,14 +22,13 @@ if [[ $(dpkg -l sshpass > /dev/null 2>&1) -ne "0" ]] ; then
exit 1
fi
data=$(sshpass -p $ssh_password ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $ssh_user@$ssh_host -q ':delay $ssh_delay; /system health print; /system resource print; /sytem resource cpu print')
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; /sytem resource cpu print')
# setze user und passwort
ssh_user=${ssh_user:-user}
ssh_password=${ssh_password:-password}
ssh_host=${ssh_host:-192.168.2.1}
name=${name:-mikrotik}
ssh_delay=${ssh_delay:-4s} # because ssh causes extra oad >20%
# wenn parameter = ...
if [ "$1" = "autoconf" ]; then