Community discussions

MikroTik App
 
MDMD
just joined
Topic Author
Posts: 11
Joined: Wed Jun 16, 2021 9:10 am

Scrpit to enable or disable interface list

Wed Jun 16, 2021 9:19 am

Hello guys I'm new in this networking world.
I can run scheduler.
But I don't know how to write a script to enable or disable interface list.

Please help
 
jonah1810
Frequent Visitor
Frequent Visitor
Posts: 98
Joined: Tue Jul 30, 2019 10:19 pm

Re: Scrpit to enable or disable interface list

Thu Jun 17, 2021 6:59 pm

/interface list member disable [find where list="your-list"]


/interface list member enable [find where list="your-list"]
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Scrpit to enable or disable interface list

Thu Jun 17, 2021 8:46 pm

...But I don't know how to write a script to enable or disable interface list....

The interface list can't be disabled,
you can only disable or enable all specific interface list members at same time, like @jonah1810 has wrote.
 
MDMD
just joined
Topic Author
Posts: 11
Joined: Wed Jun 16, 2021 9:10 am

Re: Scrpit to enable or disable interface list

Sat Jun 19, 2021 5:10 am

/interface list member disable [find where list="your-list"]


/interface list member enable [find where list="your-list"]
Thanks mate that works in command line yes,
How can i put that command in script..
Currently i'm doing it manually which is tough to keep up with :(
Image
You do not have the required permissions to view the files attached to this post.
 
MDMD
just joined
Topic Author
Posts: 11
Joined: Wed Jun 16, 2021 9:10 am

Re: Scrpit to enable or disable interface list

Sat Jun 19, 2021 9:02 am

/interface list member disable [find where list="your-list"]


/interface list member enable [find where list="your-list"]
How can i run those terminal commands by a script ?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Scrpit to enable or disable interface list  [SOLVED]

Sat Jun 19, 2021 9:15 pm

Why you change the command?
On your screenshot you are removed "member" and added the " at start and at the end of the command.

must be writed as-is:
/interface list member disable [find where list="listd"]
 
MDMD
just joined
Topic Author
Posts: 11
Joined: Wed Jun 16, 2021 9:10 am

Re: Scrpit to enable or disable interface list

Sun Jun 20, 2021 5:00 am

Why you change the command?
On your screenshot you are removed "member" and added the " at start and at the end of the command.

must be writed as-is:
/interface list member disable [find where list="listd"]
Thank a lot :) it worked :) :)

Who is online

Users browsing this forum: Google [Bot] and 16 guests