Last active
September 3, 2024 08:35
-
-
Save kangarie/3dc35301138bc8232b2571880753fa7c to your computer and use it in GitHub Desktop.
Mikrotik scheduler script to check connection by ping, restart when ping timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# isi dgn nama interface | |
:local interface "ovpn-client" | |
# isi dgn ip netwatch | |
:local ip "192.168.195.1" | |
:if ([/ping $ip count=5] = 0) do { | |
:log warning "Interface $interface is restarting" | |
/interface disable $interface | |
:delay 1 | |
/interface enable $interface | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment