diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index 35e34495942db557557c0aa7ae1b32fb0edd77fb..ea63423715bbf8604d3f1681c1b6552e9cf45777 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -614,7 +614,9 @@ Write-Verbose "Required update action items:`n> - $($UpdItems -join "`n> - ")`n" if ($ConfigShouldBeUpdated) { $ConfigUpdated = Update-Configuration if (-Not $ConfigUpdated) { - Log-Error "Updating the configuration failed, $($Me) terminating!" + $msg = "Updating the configuration failed, $($Me) terminating!" + Log-Error $msg + Send-MailReport -Subject "updated failed!" -Body $msg Exit } } @@ -622,7 +624,9 @@ if ($ConfigShouldBeUpdated) { if ($ServiceShouldBeUpdated) { $ServiceUpdated = Update-ServiceBinaries if (-Not $ServiceUpdated) { - Log-Error "Updating the service binaries failed, $($Me) terminating!" + $msg = "Updating the service binaries failed, $($Me) terminating!" + Log-Error $msg + Send-MailReport -Subject "updated failed!" -Body $msg Exit } }