Hello,
Brand new to scripting and I wanted to get a second opinion. The script works but I was wondering if there was a better way of doing it.
The script needs to disable and then re-enable PPPoE, check if the internet is working, and then reboot if it can’t get to the internet. Here’s what I have.
/interface disable pppoe-out
:log info message=(“pppoe disabled”);
:delay 5s
/interface enable pppoe-out
:log info message=("pppoe enabled ");
:delay 5s
:if ([/ping 8.8.8.8 interval=5 count=5] =0) do={
log info “internet is down, rebooting” ; /system reboot
} else={
log info “internet is working”
}