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 ?