Community discussions

MikroTik App
 
VitaliySte
just joined
Topic Author
Posts: 3
Joined: Mon May 07, 2018 11:12 am

Run-after-reset import certificate stop script

Mon Jun 07, 2021 11:33 am

I try to import certificates in run-after-reset script.
:delay 15s
# scriptbefore
:foreach crt in=[/file find where type=".crt file"] do={/certificate import file-name=[/file get $crt name] passphrase=""}  
:foreach p12 in=[/file find where type=".p12 file"] do={/certificate import file-name=[/file get $p12 name] passphrase="******"} 
#scriptafter
And my script import stopped with error, but certificates imported succesfully.
Screenshot_20210607_105746-1.png
Any error in run-after-reset script must stop script - it is normal
I think "import certificate" use output to error stream, not to normal out stream
Or I do somthing wrong?
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Run-after-reset import certificate stop script

Mon Jun 07, 2021 1:49 pm

Have you read log line 55?
 
VitaliySte
just joined
Topic Author
Posts: 3
Joined: Mon May 07, 2018 11:12 am

Re: Run-after-reset import certificate stop script

Mon Jun 07, 2021 3:04 pm

Have you read log line 55?
Inattention. I saw the first error and start to overcome it.
And overcame, launching imports through
:execute
And then my eyes opened when I saw the next error)

Who is online

Users browsing this forum: Ahrefs [Bot], rogerioqueiroz and 19 guests