diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-08 17:32:12 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 20:37:57 +0100 |
commit | ba2df80f073caf6b426def177b217d1b37954d7f (patch) | |
tree | 5dadd74e56ded840e62e82127a9315c8769bfd83 /backup-email.rsc | |
parent | 19802c0b6977f9467fada4ace3cab017dd98964b (diff) | |
parent | 242ecef012f5208b6fa088a1222d0d5477e5b2ed (diff) |
Merge branch 'LogPrint' into next
Diffstat (limited to 'backup-email.rsc')
-rw-r--r-- | backup-email.rsc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/backup-email.rsc b/backup-email.rsc index e4dec3b..64ca69c 100644 --- a/backup-email.rsc +++ b/backup-email.rsc @@ -27,7 +27,7 @@ :global CleanName; :global DeviceInfo; :global FormatLine; - :global LogPrintExit2; + :global LogPrint; :global MkDir; :global RandomDelay; :global ScriptFromTerminal; @@ -38,12 +38,14 @@ :global WaitFullyConnected; :if ([ :typeof $SendEMail2 ] = "nothing") do={ - $LogPrintExit2 error $ScriptName ("The module for sending notifications via e-mail is not installed.") true; + $LogPrint error $ScriptName ("The module for sending notifications via e-mail is not installed."); + :error false; } :if ($BackupSendBinary != true && \ $BackupSendExport != true) do={ - $LogPrintExit2 error $ScriptName ("Configured to send neither backup nor config export.") true; + $LogPrint error $ScriptName ("Configured to send neither backup nor config export."); + :error false; } :if ([ $ScriptLock $ScriptName ] = false) do={ @@ -66,7 +68,8 @@ :local Attach ({}); :if ([ $MkDir $DirName ] = false) do={ - $LogPrintExit2 error $ScriptName ("Failed creating directory!") true; + $LogPrint error $ScriptName ("Failed creating directory!"); + :error false; } # binary backup @@ -111,7 +114,7 @@ :local I 0; :while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={ :if ($I >= 120) do={ - $LogPrintExit2 warning $ScriptName ("Files are still available, sending e-mail failed.") false; + $LogPrint warning $ScriptName ("Files are still available, sending e-mail failed."); :set PackagesUpdateBackupFailure true; :error false; } |