mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-08-01 16:54:35 +02:00
update for v6/v7 support
This commit is contained in:
parent
4871e9432b
commit
b10b99bd87
120 changed files with 1479 additions and 22 deletions
20
scripts/v6/ch8-02-for-check-web.rsc
Normal file
20
scripts/v6/ch8-02-for-check-web.rsc
Normal file
|
@ -0,0 +1,20 @@
|
|||
# filename: ch8-02-for-check-web.rsc
|
||||
|
||||
# define an array of web sites
|
||||
:local WebSites {"mikrotik.com"; "google.com"; "twitter.com"};
|
||||
|
||||
# use a simple for loop to check if each site is reachable
|
||||
:for SiteIndex from=0 to=2 do={
|
||||
|
||||
:local Site ($WebSites->$SiteIndex);
|
||||
|
||||
:put "Pinging web site: $Site";
|
||||
|
||||
:local PingResult [/ping $Site count=3 ];
|
||||
:if ($PingResult > 0) do {
|
||||
:put ("\nWeb site $Site reached OK\n");
|
||||
} else={
|
||||
:put ("\nNo response from web site: $Site\n");
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue