Using if statements to get interface values.

Good Day,

I am having some troubles with if statements.

What I want to achieve is as follows.

A script that checks the wireless interface if default foward, default authenticate and hide ssid is enabled or not.

It must be able to distinguish between a virtual ap and the physical wireless interface.

For example. A radio is running NV2 with a disabled virtual AP.

:if interface wireless wireless-protocol=“nv2”
do={

}

Then it should check if default forward and default authenticate is enabled.

If one is enabled, then all must be disabled.

The scrip should stop if these values is already disabled.

The same with a radio running a virtual ap.

Check if hide ssid is on and that the other two is off.

You get the point.

Currently my script turns off forward and auth every 7 day, but there is no check to see if it is disabled.

I want to do it every hour without kicking clients off for a few seconds if a sector is already closed.

:foreach i in=[/interface wireless find where wireless-protocol="nv2"] do={
  ...
}