Community discussions

MikroTik App
 
infabo
Long time Member
Long time Member
Topic Author
Posts: 619
Joined: Thu Nov 12, 2020 12:07 pm

Import script stops after tool fetch

Tue Dec 28, 2021 4:15 pm

I am running 7.1.1 ROS and I have an import Script that adds some config on top of Default configuration.

Config.rsc
some commands
...
/tool fetch url=https://curl.haxx.se/ca/cacert.pem
/certificate import file-name=cacert.pem passphrase=""
...
some commands
I Upload this File and call:
/import file-name=Config.rsc
Every command before "tool/fetch" is executed perfectly. i can at least verify that every setting was applied.

But everything after "tool/fetch" does not get applied. Even Stranger: there should be a File called cacert.pem - but IT IS Not there.

But If i call
/tool fetch url=https://curl.haxx.se/ca/cacert.pem
From CLI - it works perfectly. The File gets Written.

But Strange is, when i Paste These two Lines to CLI:
/tool fetch url=https://curl.haxx.se/ca/cacert.pem
/certificate import file-name=cacert.pem passphrase=""
THE Second Line is Not executed!! It Shows Progress of fetch and Then it Just Skips the certificate call.

What do i do wrong?
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: Import script stops after tool fetch

Wed Dec 29, 2021 4:03 pm

You need to add a delay after fetch so the file can be written.

:delay 60s

Who is online

Users browsing this forum: No registered users and 12 guests