How to reset servers from script,from terminal i must do print to get item number and then to use disable-enable item number,but this from script doesn’t work anybody help please.Any kind of help or some instruction will be good.
PLEASE do yourself and us a favor and use the wonderful, magic and - really - even free “search” function of the forum.
This has been asked soooo many times.
You need to use the “find” command in scripts!
Best regards,
Christian Meis
i did that i wouldn’t ask you if i know the answer,i try with find and nothing,do you really think i’m stupid and i didn’t try with searching whole forum.
p.s.: Relax man
I have to admit, the search function of this forum is not even close to being good.
Well, when searching for “disable script”, the third post in the search results (the second, if i don’t count your very own post) deals with exactly this question (and gives the answer, too).
But hey - I AM relaxed. But sometimes I read too many questions here in the forum which could have been answered by a little own research. And that’s what I dislike… ![]()
Best regards,
Christian Meis
PS @ Normunds: Why not improve it
?
sorry i didn’t search for “disable script” i searched for “pppoe server disable” and find nothing,will try with “disable script”
No problem - the search function DOES indeed produce differing results ![]()
Here’s the link to the post I meant:
http://forum.mikrotik.com//viewtopic.php?t=11016&highlight=disable+script
Best regards,
Christian Meis
OK i read this post ,and i try this one bellow even before reading this post but this is problem,this script wont work :
:put [/interface pppoe-server server print]
:put [/interface pppoe-server server disable [find from=0]]
but, when i put this commands in terminal one by one works perfect but like script won’t, where do i make wrong.
Here’s an actual example, assuming you want to disable the PPPoE server for service-name “service1” from a script (this will also work from terminal directly!):
/interface pppoe-server server disable [/interface pppoe-server server find service-name="service1"]
Best regards,
Christian Meis
Like cmit’s works ,like this
:put [/interface pppoe-server server disable [/interface pppoe-server server find from=0]]
won’t. ![]()
Thanks cmit.
cmit said this in his first post - use NAME, not number. item numbers don’t work in scripts, this is rule number one of scripting
Thanks u to Normis,didn’t know that ,maybe because i’m beginner in scripting ![]()