Interface Status Script

Hi Everyone!

I need a script that if a ethernet is running, the bridge is enable, but the ethernet is no running, the bridge is disabled.
I used this code, but not works:

{
:if ([/interface ethernet get Ethernet5 running])
do={[/interface bridge enable Bridge2]}
else={[/interface bridge disable Bridge2]}
}


Can you help me?

Thanks!

running can be true or false, this code should work:

{
:if ([/interface ethernet get Ethernet5 running]=true)
do={[/interface bridge enable Bridge2]}
else={[/interface bridge disable Bridge2]}
}