I am trying to write a script that will look at the DHCP leases, and compare the (IP) address entry to the Name list in the simple queues, and if it doesn't exist, create a simple queue.
I am trying (and failing!) with:
Code: Select all
{:foreach d in=[/ip dhcp-server lease find address]
do={:if ([/queue simple find name]!="$d") do={/queue simple add burst-limit=192k/512k burst-threshold=100k/220k burst-time=5s/5s direction=both disabled=no interface=all limit-at=128k/256k max-limit=128k/256k name=$d parent=none priority=8 queue=wireless-default/wireless-default target-addresses=$d/32 total-queue=wireless-default; :log info ("New Queue Created: " . [/ip dhcp-server lease get $d address]);
}
}
}
Thanks
Brian
Zimbabwe