Community discussions

MikroTik App
 
MrYAZID
just joined
Topic Author
Posts: 1
Joined: Mon Feb 13, 2023 5:06 pm

plz help me in this script

Mon Feb 13, 2023 8:23 pm

i need script when ether4 not connect port simple queue name=GHACHI stoped
I tried this script but it didn't work
Can you fix it or tip me on a new script
:global cableConnected;
:if ([/interface get ether4 disabled] = "true") do={
  :set cableConnected false;
} else={
  :set cableConnected true;
}

:if ($cableConnected = false) do={
  /queue simple disable [find name="GHACHI"];
}
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: plz help me in this script

Mon Feb 13, 2023 10:42 pm

:if (([/interface ethernet monitor ether4 once as-value]->"status") = "no-link") do={
    /queue simple disable [find where name="GHACHI" and disabled=no]
} else={
    /queue simple enable [find where name="GHACHI" and disabled=yes]
}

Who is online

Users browsing this forum: No registered users and 29 guests