mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-26 10:59:33 +00:00
Compare commits
22 commits
c3428b6a2e
...
7b07dd86de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b07dd86de | ||
|
|
07bc46f17d | ||
|
|
309da0a6c6 | ||
|
|
72ffd15888 | ||
|
|
7e62c7d98f | ||
|
|
e4dee910d6 | ||
|
|
59c9785da1 | ||
|
|
393cea54ca | ||
|
|
8f7b6eba95 | ||
|
|
1558d6383a | ||
|
|
ef0af91fc5 | ||
|
|
7744f1c93c | ||
|
|
62a434048c | ||
|
|
1157c91ddc | ||
|
|
06044bb799 | ||
|
|
6e41f0ae12 | ||
|
|
5de42390a2 | ||
|
|
23db61ff7c | ||
|
|
3021379c89 | ||
|
|
26e080cf6f | ||
|
|
2c50b41c06 | ||
|
|
b314e07bcb |
8 changed files with 8 additions and 23 deletions
|
|
@ -45,6 +45,9 @@ Run the complete base installation:
|
|||
};
|
||||
:put "Loading configuration and functions...";
|
||||
/system/script { run global-config; run global-functions; };
|
||||
:put "Scheduling to load configuration and functions...";
|
||||
/system/scheduler/remove [ find where name="global-scripts" ];
|
||||
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
|
||||
:if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={
|
||||
:put "Renaming certificate by its common-name...";
|
||||
:global CertificateNameByCN;
|
||||
|
|
|
|||
5
Makefile
5
Makefile
|
|
@ -12,7 +12,7 @@ DATE ?= $(shell date --rfc-email)
|
|||
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
|
||||
export DATE VERSION
|
||||
|
||||
.PHONY: all checksums commitinfo docs rsc clean
|
||||
.PHONY: all checksums docs rsc clean
|
||||
|
||||
all: checksums docs rsc
|
||||
|
||||
|
|
@ -21,9 +21,6 @@ checksums: checksums.json
|
|||
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
||||
contrib/checksums.sh > $@
|
||||
|
||||
commitinfo:
|
||||
contrib/commitinfo.sh
|
||||
|
||||
docs: $(HTML)
|
||||
|
||||
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html
|
||||
|
|
|
|||
BIN
README.d/05-run-and-schedule-scripts.avif
Normal file
BIN
README.d/05-run-and-schedule-scripts.avif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -129,12 +129,12 @@ Now let's download the main scripts and add them in configuration on the fly.
|
|||
|
||||

|
||||
|
||||
And finally run configuration and functions. This will also add the
|
||||
scheduler for loading at system startup automatically.
|
||||
And finally load configuration and functions and add the scheduler.
|
||||
|
||||
/system/script { run global-config; run global-functions; };
|
||||
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
|
||||
|
||||

|
||||

|
||||
|
||||
> 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the
|
||||
> RouterOS on your device is too old. Check for updates!
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ HTML := $(wildcard *.html)
|
|||
all: docs
|
||||
|
||||
docs: $(HTML)
|
||||
sed -i \
|
||||
-e '/href=/s|\.md|\.html|' \
|
||||
sed -i -e '/href=/s|\.md|\.html|' \
|
||||
-e '/blockquote/s|/\*! display \*/|display: none;|' \
|
||||
$(HTML)
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
sed -i \
|
||||
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
|
||||
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
|
||||
global-functions.rsc
|
||||
|
|
@ -1900,14 +1900,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
|
||||
/system/scheduler/add name="global-scripts" start-time=startup;
|
||||
}
|
||||
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
||||
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
|
||||
/system/scheduler/set "global-scripts" on-event=$OnEvent;
|
||||
}
|
||||
|
||||
# Log success
|
||||
:local Resource [ /system/resource/get ];
|
||||
$LogPrintOnce info $ScriptName ("Loaded on " . $Resource->"board-name" . \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue