aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/scriptrunonce.rsc13
1 files changed, 7 insertions, 6 deletions
diff --git a/mod/scriptrunonce.rsc b/mod/scriptrunonce.rsc
index 38348a0..ffb1aff 100644
--- a/mod/scriptrunonce.rsc
+++ b/mod/scriptrunonce.rsc
@@ -15,13 +15,14 @@
:global ScriptRunOnceBaseUrl;
:global ScriptRunOnceUrlSuffix;
- :global LogPrintExit2;
+ :global LogPrint;
:global ValidateSyntax;
:foreach Script in=$Scripts do={
:if (!($Script ~ "^(ftp|https?|sftp)://")) do={
:if ([ :len $ScriptRunOnceBaseUrl ] = 0) do={
- $LogPrintExit2 warning $0 ("Script '" . $Script . "' is not an url and base url is not available.") true;
+ $LogPrint warning $0 ("Script '" . $Script . "' is not an url and base url is not available.");
+ :error false;
}
:set Script ($ScriptRunOnceBaseUrl . $Script . ".rsc" . $ScriptRunOnceUrlSuffix);
}
@@ -30,19 +31,19 @@
:do {
:set Source ([ /tool/fetch check-certificate=yes-without-crl $Script output=user as-value ]->"data");
} on-error={
- $LogPrintExit2 warning $0 ("Failed fetching script '" . $Script . "'!") false;
+ $LogPrint warning $0 ("Failed fetching script '" . $Script . "'!");
}
:if ([ :len $Source ] > 0) do={
:if ([ $ValidateSyntax $Source ] = true) do={
:do {
- $LogPrintExit2 info $0 ("Running script '" . $Script . "' now.") false;
+ $LogPrint info $0 ("Running script '" . $Script . "' now.");
[ :parse $Source ];
} on-error={
- $LogPrintExit2 warning $0 ("The script '" . $Script . "' failed to run!") false;
+ $LogPrint warning $0 ("The script '" . $Script . "' failed to run!");
}
} else={
- $LogPrintExit2 warning $0 ("The script '" . $Script . "' failed syntax validation!") false;
+ $LogPrint warning $0 ("The script '" . $Script . "' failed syntax validation!");
}
}
}