From 538071631dfd22a0bf24d054c58e9dddda23bced Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 10 Mar 2026 16:20:26 +0100 Subject: [PATCH] global-functions: $ScriptInstallUpdate: warn when script exists... ... but is requested to be added. --- global-functions.rsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index e0a73045..cb74f991 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1290,7 +1290,9 @@ } :foreach Script in=$Scripts do={ - :if ([ :len [ /system/script/find where name=$Script ] ] = 0) do={ + :if ([ :len [ /system/script/find where name=$Script ] ] > 0) do={ + $LogPrint warning $0 ("Requested to add script '" . $Script . "', but that exists already!"); + } else={ $LogPrint info $0 ("Adding new script: " . $Script); /system/script/add name=$Script owner=$Script source="#!rsc by RouterOS\n" comment=$NewComment; }