mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-15 12:34:27 +02:00
packages-update: improve backup failure handling
This commit is contained in:
parent
ffad79b8fc
commit
9bd56d8aca
1 changed files with 10 additions and 0 deletions
|
@ -55,6 +55,16 @@ $ScriptLock "packages-update";
|
||||||
/ system script run $Script;
|
/ system script run $Script;
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrintExit warning ("Running backup script " . $ScriptName . " before update failed!") false;
|
$LogPrintExit warning ("Running backup script " . $ScriptName . " before update failed!") false;
|
||||||
|
:if ([ $ScriptFromTerminal "packages-update" ] = true) do={
|
||||||
|
:put "Do you want to continue anyway? [y/N]";
|
||||||
|
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
|
||||||
|
$LogPrintExit info ("User requested to continue anyway.") false;
|
||||||
|
} else={
|
||||||
|
$LogPrintExit info ("Canceled update...") true;
|
||||||
|
}
|
||||||
|
} else={
|
||||||
|
$LogPrintExit info ("Canceled non-interactive update.") true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue