added check connection function and update cpu-monitoring

This commit is contained in:
furaihan 2020-08-29 00:10:15 +07:00
parent f03e93151b
commit 840defec9b
2 changed files with 14 additions and 8 deletions

View file

@ -38,3 +38,13 @@ global ConvertUpperCase do={
}
:return $result
}
global CheckConnection do={
global ConnectionAvailable
tool flood-ping 8.8.8.8 count=10 do={
/if ($received > 8) do={
set $ConnectionAvailable [tobool true]
} else={
set $ConnectionAvailable [tobool false]
}
}
}