I'm pulling my hair out over here, hoping you guys can offer some guidance. I'm trying to create a script that, on boot up, will reach out to a remote server, download a "config file" of sorts (or any set of commands) and execute them. In order to achieve this, I'm using a fetch, then calling /import on the file. When I run this script via the CLI, it works perfectly. When I let it execute from the scheduler (on boot), it gets as far as the fetch, the file shows up in the filesystem for a brief second, then vanishes and the script stops there.
What might I be doing wrong here? Is this a bug?
The script:
Code: Select all
/system script add name="OnBoot-ConfigFetch" source={/tool fetch url="https://cpe.mydomain.com/routeros/mikrotik-onboot.rsc" mode="https" dst-path="mikrotik-onboot.rsc";/import mikrotik-onboot.rsc;}
Code: Select all
/system scheduler add disabled=no name=OnBoot-ConfigFetch on-event=OnBoot-ConfigFetch start-time=startup interval=0s