mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-03 09:44:33 +02:00
backup-partition: add a scheduler in backup...
... that logs a warning when backup is booted.
This commit is contained in:
parent
77ef9b2c95
commit
0694d9af3e
2 changed files with 9 additions and 0 deletions
|
@ -31,7 +31,11 @@ $ScriptLock $0;
|
|||
:local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
|
||||
|
||||
:do {
|
||||
/system/scheduler/add start-time=startup \
|
||||
name=("running-from-" . $FallbackTo) \
|
||||
on-event=(":log warning \"Running from partition '" . $FallbackTo . "'!");
|
||||
/partitions/save-config-to $FallbackTo;
|
||||
/system/scheduler/remove ("running-from-" . $FallbackTo);
|
||||
$LogPrintExit2 info $0 ("Saved configuration to partition '" . \
|
||||
$FallbackTo . "'.") false;
|
||||
} on-error={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue