Hello everyone,
I'm trying to make a startup script to run and automatically change some router settings and this script works perfectly if I run it from the terminal, but if the GUI "run script" button is pressed or the scheduler runs the script, the run count increases, but the script does not complete.
I have the following script:
{
{/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \
disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=\
CHANGEME wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee \
disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=\
CHANGEME_5G_AC_Only wireless-protocol=802.11}
{/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=dynamic-keys supplicant-identity=\
MikroTik wpa-pre-shared-key=CHANGEME wpa2-pre-shared-key=CHANGEME}}
{/user group set 1 skin=restech
/user group set 0 skin=customer}
{/int wireless
set 0 name=wlan1
set 1 name=wlan2} <------------------------------- With some tests, I have determined that all settings above this line apply correctly, so this is where it breaks
{/int bridge port
remove 4,5
add bridge=bridge interface=wlan1
add bridge=bridge interface=wlan2}
{/system ident set name=CHANGEME}
{/int eth reset-mac-address 0,1,2,3,4}
{/sys script rem program}
}
Any idea what I'm doing wrong here?
Thanks!