From 29bcd191ee7b4487cb9c909e6c7778767c6283f8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 17 Apr 2025 10:44:05 +0200 Subject: [PATCH 1/2] global-functions: $ScriptInstallUpdate: support downloading certificate... ... for individual scripts. Just add it in comment with "certificate=...". This also works on installtion: $ScriptInstallUpdate new-script "base-url=..., certificate=..."; Closes: https://github.com/eworm-de/routeros-scripts/pull/97 --- global-functions.rsc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 70269c80..72c36cdc 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1195,6 +1195,12 @@ :error true; } + :if ([ :len ($ScriptInfo->"certificate") ] > 0) do={ + :if ([ $CertificateAvailable ($ScriptInfo->"certificate") ] = false) do={ + $LogPrint warning $0 ("Downloading certificate failed, trying without."); + } + } + :do { :local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ]; :local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ]; From b78df91b23a4e108ef0268c3c604191581d104ae Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 17 Apr 2025 22:22:05 +0200 Subject: [PATCH 2/2] README: and another hint on RouterOS version --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 1f7c8edd..e8e1b686 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,9 @@ And finally load configuration and functions and add the scheduler. ![screenshot: run and schedule scripts](README.d/05-run-and-schedule-scripts.avif) +> 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the +> RouterOS on your device is too old. Check for updates! + ### Scheduled automatic updates The last step is optional: Add this scheduler **only** if you want the