Backup route

Hy guys!
I have trouble to write script which wil activate backup gateway in case that my PPPOE out interface is not working , and again to deaktivate if interface is UP.
My ROS is 2.9.50 .
I was try to modify script which I find here on forum , and it is not working , script is here :

:local pppoe1-name adsl 
:local pppoe1-status ([/interface pppoe-client get [/interface pppoe-client find name $pppoe1-name] running ]) 
:if ($pppoe1-status = false) do {/ip route enable [/ip route find comment="myRoute"])
:if ($pppoe1-status = true) do {/ip route disable [/ip route find comment="myRoute"])

Can somebody help me with this?