That script doesn't appear to be working, no "Xbox found" or "Xbox missing"
If I comment your nested if statement it works; so same result as mine.
I know with my script the else wasn't working either, it wouldn't give me the "Xbox Missing".
Second issue with my script, was if I uncommented the nested if statement it wouldn't work either :/
So in summary from your script, this doesn't work...
:global xstatus 1
/ip dhcp-server lease
:local macsearch [get [find where comment="XBOX - 30c Snowmass" and status=bound]]
:if ([:len $macsearch] > 0) do={
:if ($xstatus = "missing") do={
:log info "XBOX found"
:set xstatus "found"
}
}
But if I remove the nested portion, it works. so has the same problem I have
:global xstatus 1
/ip dhcp-server lease
:local macsearch [get [find where comment="XBOX - 30c Snowmass" and status=bound]]
:if ([:len $macsearch] > 0) do={
# :if ($xstatus = "missing") do={
:log info "XBOX found"
# :set xstatus "found"
# }
}
Could it be because an item not found shows as "no such item" ?
[admin@OhakuneRTR] /ip dhcp-server lease> get [find where comment="XBOX - 30c Snowmass" and status=bound]
[admin@OhakuneRTR] /ip dhcp-server lease> get [find where comment="NOTHING" and status=bound]
no such item