Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
577154e3
Commit
577154e3
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Adapt update wrap-up and message generation to recent changes.
Refers to
#18
,
#28
parent
fde22723
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Updater/Update-Service.ps1
+16
-11
16 additions, 11 deletions
Updater/Update-Service.ps1
with
16 additions
and
11 deletions
Updater/Update-Service.ps1
+
16
−
11
View file @
577154e3
...
...
@@ -617,7 +617,6 @@ if ($ConfigShouldBeUpdated) {
Log-Error
"Updating the configuration failed,
$(
$Me
)
terminating!"
Exit
}
$UpdSummary
+=
"The configuration files were updated.
`n
"
}
if
(
$ServiceShouldBeUpdated
)
{
...
...
@@ -628,20 +627,26 @@ if ($ServiceShouldBeUpdated) {
}
}
Exit
$UpdSummary
=
"Updated
$(
$UpdItems
-join
" and "
)
."
if
(
$msg
-ne
""
)
{
if
(
$ServiceRunningBefore
)
{
Log-Debug
"Update action occurred, finishing up..."
Start-MyService
}
else
{
Log-Debug
"Not starting the service as it was not running before."
}
Send-MailReport
-Subject
"Config and / or service has been updated!"
`
-Body
$msg
if
(
$ServiceRunningBefore
)
{
Log-Debug
"
$(
$UpdSummary
)
Trying to start the service again..."
Start-MyService
}
else
{
Log-Debug
"
$(
$UpdSummary
)
Leaving the service stopped, as it was before."
}
$UpdDetails
=
$
(
"An
$(
$Me
)
run completed successfully. Updated items:"
"
`n
> -
$(
$UpdItems
-join
"
`n
> - "
)
"
)
if
(
$ConfigUpdated
)
{
$UpdDetails
+=
"
`n`n
Configuration validation summary:
`n
$(
$ConfigSummary
)
"
}
Send-MailReport
-Subject
"
$UpdSummary
"
-Body
"
$UpdDetails
"
Upload-LogFiles
Log-Debug
"
$(
$Me
)
finished."
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment