RESTART INTERFACE ON INTERNET CHANGE

{

:local vpn [/interface ovpn-client monitor "NICE-netpap-vpn" once  as-value]


:if ($vpn->"status" = "connected") do={
  
  :log info "connected"


} else={
 
  :log info "Disconnected"

  :global oc [/interface ovpn-client find name="NICE-netpap-vpn"]
 
   :if ($oc != "") do={
 
      :put ""
      /interface ovpn-client set  $oc disabled=yes
   
   :log info "2"
     /interface ovpn-client set  $oc disabled=no
 
   :log info "3"
  }



}


}


Powered by BetterDocs


en_USEnglish