mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-21 11:24:31 +02:00
global: drop script 'global-wait'
All scripts wait for the global functions on their own now.
This commit is contained in:
parent
2db73a189c
commit
d5afc79eed
51 changed files with 137 additions and 81 deletions
|
@ -33,11 +33,9 @@ There is also global configuration:
|
|||
|
||||
* `BridgePortTo`: specify the configuration to be applied by default
|
||||
|
||||
Install [global-wait](global-wait.md) and add a scheduler to start with
|
||||
default setup on system startup:
|
||||
Add a scheduler to start with default setup on system startup:
|
||||
|
||||
$ScriptInstallUpdate global-wait;
|
||||
/ system scheduler add name=bridge-port-to-default on-event="/ system script { run global-wait; run bridge-port-to-default; }" start-time=startup;
|
||||
/ system scheduler add name=bridge-port-to-default on-event="/ system script run bridge-port-to-default;" start-time=startup;
|
||||
|
||||
Usage and invocation
|
||||
--------------------
|
||||
|
@ -75,11 +73,6 @@ More configuration can be loaded by setting `BridgePortTo`:
|
|||
* Interfaces `en1` and `en2` are unchanged.
|
||||
* Interface `en3` is put in bridge `br-intern`.
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Wait for configuration und functions](global-wait.md)
|
||||
|
||||
---
|
||||
[◀ Go back to main README](../README.md)
|
||||
[▲ Go back to top](#top)
|
||||
|
|
|
@ -19,11 +19,9 @@ Just install the script on CAPsMAN device:
|
|||
|
||||
$ScriptInstallUpdate capsman-download-packages;
|
||||
|
||||
Optionally install [global-wait](global-wait.md) and add a scheduler to run
|
||||
after startup:
|
||||
Optionally add a scheduler to run after startup:
|
||||
|
||||
$ScriptInstallUpdate global-wait;
|
||||
/ system scheduler add name=capsman-download-packages on-event="/ system script { run global-wait; run capsman-download-packages; }" start-time=startup;
|
||||
/ system scheduler add name=capsman-download-packages on-event="/ system script run capsman-download-packages;" start-time=startup;
|
||||
|
||||
Only packages available in older version are downloaded. For initial setup
|
||||
place the required packages to CAPsMAN package path (see
|
||||
|
@ -55,7 +53,6 @@ See also
|
|||
--------
|
||||
|
||||
* [Run rolling CAP upgrades from CAPsMAN](capsman-rolling-upgrade.md)
|
||||
* [Wait for configuration und functions](global-wait.md)
|
||||
|
||||
---
|
||||
[◀ Go back to main README](../README.md)
|
||||
|
|
|
@ -44,7 +44,7 @@ Just run the script:
|
|||
|
||||
Alternatively running on startup may be desired:
|
||||
|
||||
/ system scheduler add name=check-certificates-startup on-event="/ system script { run global-wait; run check-certificates; }" start-time=startup;
|
||||
/ system scheduler add name=check-certificates-startup on-event="/ system script run check-certificates;" start-time=startup;
|
||||
|
||||
See also
|
||||
--------
|
||||
|
|
|
@ -12,23 +12,23 @@ passphrase to a pseudo-random string daily.
|
|||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
Just install this script and [global-wait](global-wait.md).
|
||||
Just install this script.
|
||||
|
||||
Depending on whether you use CAPsMAN (`/ caps-man`) or local wireless
|
||||
interface (`/ interface wireless`) you need to install a different script.
|
||||
|
||||
For CAPsMAN:
|
||||
|
||||
$ScriptInstallUpdate daily-psk.capsman,global-wait;
|
||||
$ScriptInstallUpdate daily-psk.capsman;
|
||||
|
||||
For local interface:
|
||||
|
||||
$ScriptInstallUpdate daily-psk.local,global-wait;
|
||||
$ScriptInstallUpdate daily-psk.local;
|
||||
|
||||
And add schedulers to run the script:
|
||||
|
||||
/ system scheduler add interval=1d name=daily-psk-nightly on-event="/ system script run daily-psk.local;" start-date=may/23/2018 start-time=03:00:00;
|
||||
/ system scheduler add name=daily-psk-startup on-event="/ system script { run global-wait; run daily-psk.local; }" start-time=startup;
|
||||
/ system scheduler add name=daily-psk-startup on-event="/ system script run daily-psk.local;" start-time=startup;
|
||||
|
||||
These will update the passphrase on boot and nightly at 3:00.
|
||||
|
||||
|
@ -46,11 +46,6 @@ Then add an access list entry:
|
|||
|
||||
Also notification settings are required for e-mail and telegram.
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Wait for configuration und functions](global-wait.md)
|
||||
|
||||
---
|
||||
[◀ Go back to main README](../README.md)
|
||||
[▲ Go back to top](#top)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
Wait for configuration und functions
|
||||
====================================
|
||||
|
||||
[◀ Go back to main README](../README.md)
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The global scripts `global-config`, `global-config-overlay` and
|
||||
`global-functions` are run by scheduler at system startup. Running another
|
||||
script at system startup may result in race condition where configuration
|
||||
and/or function are not yet available. This script is supposed to wait
|
||||
for everything being prepared.
|
||||
|
||||
Do **not** add this script `global-wait` to the `global-scripts` scheduler!
|
||||
It would inhibit the initialization of configuration and functions.
|
||||
|
||||
Requirements and installation
|
||||
-----------------------------
|
||||
|
||||
Just install the script:
|
||||
|
||||
$ScriptInstallUpdate global-wait;
|
||||
|
||||
... and add it to your scheduler, for example in combination with
|
||||
[bridge-port](bridge-port.md):
|
||||
|
||||
/ system scheduler add name=bridge-port-to-default on-event="/ system script { run global-wait; run bridge-port-to-default; }" start-time=startup;
|
||||
|
||||
See also
|
||||
--------
|
||||
|
||||
* [Manage ports in bridge](bridge-port.md)
|
||||
* [Download packages for CAP upgrade from CAPsMAN](capsman-download-packages.md)
|
||||
* [Renew certificates and notify on expiration](check-certificates.md)
|
||||
* [Use wireless network with daily psk](daily-psk.md)
|
||||
|
||||
---
|
||||
[◀ Go back to main README](../README.md)
|
||||
[▲ Go back to top](#top)
|
Loading…
Add table
Add a link
Reference in a new issue