Community discussions

MikroTik App
 
foolbaby
just joined
Topic Author
Posts: 18
Joined: Sun Feb 07, 2010 5:02 pm

[help] tool fetch

Wed Sep 14, 2022 2:23 am

i'm trying a script to disable some ethernet using this code
:local result [/tool fetch http-method=post port=80 keep-result=no url="xxxxxxxxxxxxxxxx"];
:if ($result->"status" = "finished") do={
            /interface ethernet set ether4 disabled=no;
        } else={
            /interface ethernet set ether4 disabled=yes;
        }
but it wont work , it just disable the ether4, which is i want to disable the ether4 if download failed.
so i just try check the command in terminal
/tool fetch http-method=post port=80 keep-result=no url="xxxxxxxxxxxxxxxx"
its only showing the log
sep/14 05:57:47 info fetch: file "post" downloaded
how to get those "downloaded" result as an variable to get the script works ?

Who is online

Users browsing this forum: Ellaham and 21 guests