mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-28 20:30:05 +02:00
global-functions: $ScriptInstallUpdate: support storing with CRLF
Adding this in `global-config-overlay` make the scripts being stored with CRLF line breaks: :global ScriptUpdatesCRLF true; Handle with care, I do not recommend it. Thus it's just a hidden setting.
This commit is contained in:
parent
a26f78329a
commit
f2ca62aed0
1 changed files with 3 additions and 1 deletions
|
@ -1008,6 +1008,7 @@
|
||||||
:global IDonate;
|
:global IDonate;
|
||||||
:global NoNewsAndChangesNotification;
|
:global NoNewsAndChangesNotification;
|
||||||
:global ScriptUpdatesBaseUrl;
|
:global ScriptUpdatesBaseUrl;
|
||||||
|
:global ScriptUpdatesCRLF;
|
||||||
:global ScriptUpdatesUrlSuffix;
|
:global ScriptUpdatesUrlSuffix;
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
|
@ -1081,7 +1082,8 @@
|
||||||
:if ([ $RequiredRouterOS $0 [ $EitherOr $Required "0.0" ] false ] = true) do={
|
:if ([ $RequiredRouterOS $0 [ $EitherOr $Required "0.0" ] false ] = true) do={
|
||||||
:if ([ $ValidateSyntax $SourceNew ] = true) do={
|
:if ([ $ValidateSyntax $SourceNew ] = true) do={
|
||||||
$LogPrint info $0 ("Updating script: " . $ScriptVal->"name");
|
$LogPrint info $0 ("Updating script: " . $ScriptVal->"name");
|
||||||
/system/script/set owner=($ScriptVal->"name") source=$SourceNew $Script;
|
/system/script/set owner=($ScriptVal->"name") \
|
||||||
|
source=[ $IfThenElse ($ScriptUpdatesCRLF = true) $SourceCRLF $SourceNew ] $Script;
|
||||||
:if ($ScriptVal->"name" = "global-config") do={
|
:if ($ScriptVal->"name" = "global-config") do={
|
||||||
:set ReloadGlobalConfig true;
|
:set ReloadGlobalConfig true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue