Skip to content
Snippets Groups Projects
Commit 7383cadc authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Minor layout / message changes.

parent 75318209
No related branches found
No related tags found
No related merge requests found
...@@ -582,7 +582,7 @@ if ($ConfigShouldBeUpdated) { ...@@ -582,7 +582,7 @@ if ($ConfigShouldBeUpdated) {
$UpdItems += "configuration files" $UpdItems += "configuration files"
} }
# define which configuration checker executable should be used for testing: # define which configuration checker executable to use for testing:
$ConftestExe = "$($InstallationPath)\AutoTxConfigTest.exe" $ConftestExe = "$($InstallationPath)\AutoTxConfigTest.exe"
if ($ServiceShouldBeUpdated) { if ($ServiceShouldBeUpdated) {
$UpdPackage = Find-InstallationPackage $UpdPackage = Find-InstallationPackage
...@@ -594,13 +594,14 @@ if ($ServiceShouldBeUpdated) { ...@@ -594,13 +594,14 @@ if ($ServiceShouldBeUpdated) {
$ConfigValid, $ConfigSummary = Config-IsValid $ConftestExe $ConfigToTest $ConfigValid, $ConfigSummary = Config-IsValid $ConftestExe $ConfigToTest
# if we don't have a valid configuration we complain and terminate the update: # if we don't have a valid configuration we complain and terminate:
if (-Not ($ConfigValid)) { if (-Not ($ConfigValid)) {
Log-Error "Configuration not valid for service, $($Me) terminating!" Log-Error "Configuration not valid for service, $($Me) terminating!"
Send-MailReport -Subject "Update failed, configuration invalid!" ` Send-MailReport -Subject "Update failed, configuration invalid!" `
-Body $("An update action was found to be necessary, however the" -Body $("An update action was found to be necessary, however the"
"configuration didn't`npass the validator.`n`nThe following summary" "configuration didn't`npass the validator.`n`nThe following"
"was generated by the configuration checker:`n`n$($ConfigSummary)") "summary was generated by the configuration checker:"
"`n`n$($ConfigSummary)")
Exit Exit
} }
...@@ -608,8 +609,8 @@ if (-Not ($ConfigValid)) { ...@@ -608,8 +609,8 @@ if (-Not ($ConfigValid)) {
# reaching this point means # reaching this point means
# (1) something needs to be updated (config, service or both) # (1) something needs to be updated (config, service or both)
# AND # AND
# (2) the configuration validates with the corresponding service version # (2) the config validates with the corresponding service version
Write-Verbose "Required update action items:`n> - $($UpdItems -join "`n> - ")`n" Write-Verbose "Required update items:`n> - $($UpdItems -join "`n> - ")`n"
if ($ConfigShouldBeUpdated) { if ($ConfigShouldBeUpdated) {
$ConfigUpdated = Update-Configuration $ConfigUpdated = Update-Configuration
...@@ -639,13 +640,13 @@ if ($ServiceRunningBefore) { ...@@ -639,13 +640,13 @@ if ($ServiceRunningBefore) {
Log-Debug "$($UpdSummary) Trying to start the service again..." Log-Debug "$($UpdSummary) Trying to start the service again..."
Start-MyService Start-MyService
} else { } else {
Log-Debug "$($UpdSummary) Leaving the service stopped, as it was before." Log-Debug "$($UpdSummary) Leaving the service stopped, as before."
} }
$UpdDetails = $("An $($Me) run completed successfully. Updated items:" $UpdDetails = $("An $($Me) run completed successfully. Updated items:"
"`n> - $($UpdItems -join "`n> - ")") "`n> - $($UpdItems -join "`n> - ")")
if ($ConfigUpdated) { if ($ConfigUpdated) {
$UpdDetails += "`n`nConfiguration validation summary:`n$($ConfigSummary)" $UpdDetails += "`n`nConfig validation summary:`n$($ConfigSummary)"
} }
Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails" Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment