mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-06-25 23:48:36 +02:00
Add test scripts and backup-buttons script
This commit is contained in:
parent
bf07a55ca5
commit
a1a0489377
6 changed files with 79 additions and 0 deletions
13
test-snippets/test-detect-internet.rsc
Normal file
13
test-snippets/test-detect-internet.rsc
Normal file
|
@ -0,0 +1,13 @@
|
|||
# requirement: /interface detect-internet set detect-interface-list=WAN
|
||||
|
||||
/interface detect-internet
|
||||
# set detect-interface-list=WAN
|
||||
state
|
||||
|
||||
:do {
|
||||
:log info "Waiting for internet..."
|
||||
:set $internetStatus ([:pick [print as-value] 0]->"state")
|
||||
:delay 3s
|
||||
} while ($internetStatus != "internet")
|
||||
|
||||
:log info "Connected to internet."
|
Loading…
Add table
Add a link
Reference in a new issue