mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
backup-cloud: pass failure to packages-update
This commit is contained in:
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
:global BackupRandomDelay;
|
:global BackupRandomDelay;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
:global PackagesUpdateBackupFailure;
|
||||||
|
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
@ -32,6 +33,7 @@
|
|||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
|
:set PackagesUpdateBackupFailure true;
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
@ -74,7 +76,9 @@
|
|||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
subject=([ $SymbolForNotification "floppy-disk,warning-sign" ] . "Cloud backup failed"); \
|
subject=([ $SymbolForNotification "floppy-disk,warning-sign" ] . "Cloud backup failed"); \
|
||||||
message=("Failed uploading backup for " . $Identity . " to cloud!\n\n" . [ $DeviceInfo ]) });
|
message=("Failed uploading backup for " . $Identity . " to cloud!\n\n" . [ $DeviceInfo ]) });
|
||||||
$LogPrintExit2 error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!") true;
|
$LogPrintExit2 error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!") false;
|
||||||
|
:set PackagesUpdateBackupFailure true;
|
||||||
|
:error false;
|
||||||
}
|
}
|
||||||
/file/remove "tmpfs/backup-cloud";
|
/file/remove "tmpfs/backup-cloud";
|
||||||
} on-error={ }
|
} on-error={ }
|
||||||
|
Reference in New Issue
Block a user