mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-04-22 13:09:37 +00:00
Compare commits
2 commits
bebf0206fe
...
c80dd7d891
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c80dd7d891 | ||
|
|
1e65df49fb |
3 changed files with 7 additions and 5 deletions
5
Makefile
5
Makefile
|
|
@ -21,8 +21,9 @@ checksums: checksums.json
|
||||||
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
||||||
contrib/checksums.sh > $@
|
contrib/checksums.sh > $@
|
||||||
|
|
||||||
commitinfo:
|
commitinfo: global-functions.rsc
|
||||||
contrib/commitinfo.sh
|
contrib/commitinfo.sh $< > $<~
|
||||||
|
mv $<~ $<
|
||||||
|
|
||||||
docs: $(HTML)
|
docs: $(HTML)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
sed -i \
|
sed \
|
||||||
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
|
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
|
||||||
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
|
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
|
||||||
global-functions.rsc
|
< "${1}"
|
||||||
|
|
|
||||||
|
|
@ -1900,10 +1900,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# add (and fix) global scripts scheduler
|
||||||
|
:local OnEvent "/system/script { run global-config; run global-functions; }";
|
||||||
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
|
:if ([ :len [ /system/scheduler/find where name="global-scripts" ] ] = 0) do={
|
||||||
/system/scheduler/add name="global-scripts" start-time=startup;
|
/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={
|
:if ([ /system/scheduler/get "global-scripts" on-event ] != $OnEvent) do={
|
||||||
/system/scheduler/set "global-scripts" on-event=$OnEvent;
|
/system/scheduler/set "global-scripts" on-event=$OnEvent;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue