mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $ScriptInstallUpdate: handle scripts with DOS line endings
If the script is converted to DOS line endings (\r\n) on the device it was no longer handled by $ScriptInstallUpdate. Let's change that...
This commit is contained in:
parent
de8c534d41
commit
0b8979e5b5
|
@ -832,7 +832,7 @@
|
|||
:local ReloadGlobalConfig false;
|
||||
:local UserAgent ("User-Agent: Mikrotik/" . [ /system/resource/get version ] . " Fetch");
|
||||
|
||||
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\n" ] do={
|
||||
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\r?\n" ] do={
|
||||
:local ScriptVal [ /system/script/get $Script ];
|
||||
:local ScriptFile [ /file/find where name=("script-updates/" . $ScriptVal->"name") . ".rsc" ];
|
||||
:local SourceNew;
|
||||
|
|
Loading…
Reference in a new issue