When I drop this or my complete config from the terminal the owner of the script is admin and everything runs great. When it is imported after a run after reset, the owner is *sys and it looks right, the script count goes up, but it doesn't actually do anything. Can someone set me on the right track to get this working in a run-after-reset scenario. Can I force the owner to admin? Is that the solution?Code:
/system script
add name="ChangeBand" \
source=":local delais 5s\r\n:local liste 2.4ghz-b/g,2ghz-5mhz,2ghz-10mhz;\r\n \
\r\n:foreach band in=\$liste \
do={\r\n:if (![/interface wireless get wlan1 running]) do={\r\n/interface \
wireless set wlan1 band=\$band\r\n:delay \$delais\r\n}\r\n}\r\n\r\n:if \
(![/interface wireless get wlan1 running]) \\\r\ndo={\r\n :if \
[/interface wireless nstreme get wlan1 enable-nstreme] \\\r\n do={\r\n \
/interface wireless nstreme set wlan1 enable-nstreme=no\r\n } \
else={\r\n /interface wireless nstreme set wlan1 \
enable-nstreme=yes\r\n }\r\n}"
/system scheduler
add comment="" disabled=no interval=20s name="schedcheckWifi" \
on-event=ChangeBand start-time=startup
Thanks in advance for your help.