Community discussions

MikroTik App
 
User avatar
denisun
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Wed Jul 16, 2014 6:38 pm
Location: Greece

Cloudflare update script

Wed Dec 20, 2023 10:24 am

I want to make a script for cloudflare update.

I have the following code that works correctly:
:global findresult [/file find where name="cacert.pem"]
:if ([:len $findresult] > 0) do={
/file remove cacert.pem
}
/tool fetch url=https://curl.se/ca/cacert.pem
:delay 10s
/certificate remove [find where name~"(^|/)cacert.pem_"]
/certificate import file-name=cacert.pem passphrase=""
but i dont want to have the delay command and i dont want to write to disk.
I'm trying the next code:
:put ([/tool fetch url="https://curl.se/ca/cacert.pem" output=user as-value]->"data")
to store the data in memory but i dont known how to import the import the data in certificate import command.

Who is online

Users browsing this forum: alixviral, VirtualEvan and 5 guests