mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-04 21:19:36 +00:00
Compare commits
5 commits
e2e9ca5133
...
51ce391569
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ce391569 | ||
|
|
4955b2707b | ||
|
|
de2a90d841 | ||
|
|
e2d3f0f073 | ||
|
|
595b4aea9d |
9 changed files with 30 additions and 21 deletions
|
|
@ -4,7 +4,7 @@ Initial commands
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
@ -22,8 +22,8 @@ Run the complete base installation:
|
|||
:local CertFileName "ISRG-Root-X2.pem";
|
||||
:local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
|
||||
|
||||
:if (!(([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \
|
||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={
|
||||
:if (!([ /certificate/settings/get builtin-trust-anchors ] = "trusted" && \
|
||||
[ :len [ /certificate/builtin/find where common-name=$CertCommonName ] ] > 0)) do={
|
||||
:put "Importing certificate...";
|
||||
/tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value;
|
||||
:delay 1s;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ RouterOS Scripts
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.18
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -54,8 +54,8 @@
|
|||
"). Please place your packages!");
|
||||
}
|
||||
|
||||
:foreach Package in=[ /file/find recursive where path=$PackagePath \
|
||||
type="package" package-version!=$InstalledVersion ] do={
|
||||
:foreach Package in=[ /file/find where type="package" \
|
||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||
:local File [ /file/get $Package ];
|
||||
:if ($File->"package-architecture" = "mips") do={
|
||||
:set ($File->"package-architecture") "mipsbe";
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ([ :len [ /file/find recursive where path=$PackagePath type="package" ] ] = 0) do={
|
||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||
:foreach Arch in={ "arm"; "mipsbe" } do={
|
||||
:foreach Package in={ "routeros"; "wireless" } do={
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.18
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -56,8 +56,8 @@
|
|||
"). Please place your packages!");
|
||||
}
|
||||
|
||||
:foreach Package in=[ /file/find recursive where path=$PackagePath \
|
||||
type="package" package-version!=$InstalledVersion ] do={
|
||||
:foreach Package in=[ /file/find where type="package" \
|
||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||
:local File [ /file/get $Package ];
|
||||
:if ($File->"package-architecture" = "mips") do={
|
||||
:set ($File->"package-architecture") "mipsbe";
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ([ :len [ /file/find recursive where path=$PackagePath type="package" ] ] = 0) do={
|
||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||
# NOT /interface/wifi/ #
|
||||
:foreach Arch in={ "arm"; "mipsbe" } do={
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.18
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -54,8 +54,8 @@
|
|||
"). Please place your packages!");
|
||||
}
|
||||
|
||||
:foreach Package in=[ /file/find recursive where path=$PackagePath \
|
||||
type="package" package-version!=$InstalledVersion ] do={
|
||||
:foreach Package in=[ /file/find where type="package" \
|
||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||
:local File [ /file/get $Package ];
|
||||
:if ($File->"package-architecture" = "mips") do={
|
||||
:set ($File->"package-architecture") "mipsbe";
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ([ :len [ /file/find recursive where path=$PackagePath type="package" ] ] = 0) do={
|
||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||
:foreach Arch in={ "arm"; "arm64" } do={
|
||||
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Download packages for CAP upgrade from CAPsMAN
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,10 @@ certificate is checked.
|
|||
|
||||
> ⚠️ **Warning**: The script does not limit the size of a list, but keep in
|
||||
> mind that huge lists can exhaust your device's resources (RAM and CPU),
|
||||
> and may take a long time to process.
|
||||
> and may take a long time to process.
|
||||
> Even crashes for the complete scripting (and CLI) subsystem are possible.
|
||||
> This should be logged accordingly with warnings when global functions are
|
||||
> reloaded from scheduler.
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@
|
|||
}
|
||||
$WaitFullyConnected;
|
||||
|
||||
:if ([ :len [ /log/find where topics=({"script"; "warning"}) \
|
||||
message=("\$LogPrintOnce: The message is already in log, scripting subsystem may have crashed before!") ] ] > 0) do={
|
||||
$LogPrintOnce warning $ScriptName ("Scripting subsystem may have crashed, possibly caused by us. Delaying!");
|
||||
:delay 5m;
|
||||
}
|
||||
|
||||
:local ListComment ("managed by " . $ScriptName);
|
||||
|
||||
:foreach FwListName,FwList in=$FwAddrLists do={
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.15
|
||||
# requires RouterOS, version=7.19
|
||||
# requires device-mode, fetch, scheduler
|
||||
#
|
||||
# global functions
|
||||
|
|
@ -121,8 +121,8 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:if (([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \
|
||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CommonName . "\" ] ]") ]] > 0) do={
|
||||
:if ([ /certificate/settings/get builtin-trust-anchors ] = "trusted" && \
|
||||
[ :len [ /certificate/builtin/find where common-name=$CommonName ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue