mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
packages-update: use correct syntax
This commit is contained in:
parent
dfe995be27
commit
27a81bcbca
|
@ -35,7 +35,7 @@ $ScriptLock $0;
|
||||||
:if ($NumInstalled > $NumLatest) do={
|
:if ($NumInstalled > $NumLatest) do={
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
||||||
:put "Latest version is older than installed one. Want to downgrade? [y/N]";
|
:put "Latest version is older than installed one. Want to downgrade? [y/N]";
|
||||||
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
|
:if (([ / terminal inkey timeout=60 ] % 32) = 25) do={
|
||||||
:set DoDowngrade true;
|
:set DoDowngrade true;
|
||||||
} else={
|
} else={
|
||||||
:put "Canceled...";
|
:put "Canceled...";
|
||||||
|
@ -61,7 +61,7 @@ $ScriptLock $0;
|
||||||
$LogPrintExit2 warning $0 ("Running backup script " . $ScriptName . " before update failed!") false;
|
$LogPrintExit2 warning $0 ("Running backup script " . $ScriptName . " before update failed!") false;
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
||||||
:put "Do you want to continue anyway? [y/N]";
|
:put "Do you want to continue anyway? [y/N]";
|
||||||
:if (([ :terminal inkey timeout=60 ] % 32) = 25) do={
|
:if (([ / terminal inkey timeout=60 ] % 32) = 25) do={
|
||||||
$LogPrintExit2 info $0 ("User requested to continue anyway.") false;
|
$LogPrintExit2 info $0 ("User requested to continue anyway.") false;
|
||||||
} else={
|
} else={
|
||||||
$LogPrintExit2 info $0 ("Canceled update...") true;
|
$LogPrintExit2 info $0 ("Canceled update...") true;
|
||||||
|
@ -80,7 +80,7 @@ $ScriptLock $0;
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
:if ([ $ScriptFromTerminal $0 ] = true) do={
|
||||||
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
|
:put "Do you want to (s)chedule reboot or (r)eboot now? [s/R]";
|
||||||
:if (([ :terminal inkey timeout=60 ] % 32) = 19) do={
|
:if (([ / terminal inkey timeout=60 ] % 32) = 19) do={
|
||||||
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
|
/ system scheduler add name="reboot-for-update" start-time=03:00:00 interval=1d \
|
||||||
on-event=(":global RandomDelay; \$RandomDelay 3600; " . \
|
on-event=(":global RandomDelay; \$RandomDelay 3600; " . \
|
||||||
"/ system scheduler remove reboot-for-update; / system reboot;");
|
"/ system scheduler remove reboot-for-update; / system reboot;");
|
||||||
|
|
Loading…
Reference in a new issue