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
546d6e8d
Commit
546d6e8d
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Some whitespace cleanups
parent
cd3e5cac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Updater/Update-Service.ps1
+6
-6
6 additions, 6 deletions
Updater/Update-Service.ps1
with
6 additions
and
6 deletions
Updater/Update-Service.ps1
+
6
−
6
View file @
546d6e8d
...
@@ -56,7 +56,7 @@ function ServiceIsBusy {
...
@@ -56,7 +56,7 @@ function ServiceIsBusy {
function
Get-ServiceAccount
([
string
]
$ServiceName
)
{
function
Get-ServiceAccount
([
string
]
$ServiceName
)
{
try
{
try
{
$Account
=
$
(
Get-WmiObject
Win32_Service
|
$Account
=
$
(
Get-WmiObject
Win32_Service
|
Where-Object
{
$_
.
Name
-match
$ServiceName
})
.
StartName
Where-Object
{
$_
.
Name
-match
$ServiceName
})
.
StartName
}
}
catch
{
catch
{
...
@@ -78,7 +78,7 @@ function Check-PerformanceMonitormembership() {
...
@@ -78,7 +78,7 @@ function Check-PerformanceMonitormembership() {
Write-Verbose
"Validated membership in group [
$(
$GroupName
)
]."
Write-Verbose
"Validated membership in group [
$(
$GroupName
)
]."
}
}
catch
{
catch
{
Log-Warning
$
(
"Service account [
$(
$ServiceAccount
)
] is NOT a member of"
Log-Warning
$
(
"Service account [
$(
$ServiceAccount
)
] is NOT a member of"
"the local group [
$(
$GroupName
)
], monitoring CPU load"
"the local group [
$(
$GroupName
)
], monitoring CPU load"
" >>>> WILL NOT WORK! <<<<"
)
" >>>> WILL NOT WORK! <<<<"
)
}
}
...
@@ -309,7 +309,7 @@ function Update-Configuration {
...
@@ -309,7 +309,7 @@ function Update-Configuration {
Write-Verbose
"Updating configuration files:
`n
>
$(
$NewComm
)
`n
>
$(
$NewHost
)
"
Write-Verbose
"Updating configuration files:
`n
>
$(
$NewComm
)
`n
>
$(
$NewHost
)
"
Stop-MyService
"Updating configuration using files at [
$(
$UpdPathConfig
)
]."
Stop-MyService
"Updating configuration using files at [
$(
$UpdPathConfig
)
]."
$Ret
=
Update-File
$NewComm
$ConfigPath
$Ret
=
Update-File
$NewComm
$ConfigPath
# only continue if the first update worked:
# only continue if the first update worked:
if
(
$Ret
)
{
if
(
$Ret
)
{
...
@@ -403,7 +403,7 @@ function Find-InstallationPackage {
...
@@ -403,7 +403,7 @@ function Find-InstallationPackage {
Where-Object
{
$_
-match
$Pattern
}
|
Where-Object
{
$_
-match
$Pattern
}
|
Sort
-Object
|
Sort
-Object
|
Select
-Object
-Last
1
Select
-Object
-Last
1
if
([
string
]::
IsNullOrEmpty
(
$PkgDir
))
{
if
([
string
]::
IsNullOrEmpty
(
$PkgDir
))
{
Log-Error
"couldn't find installation package matching '
$(
$Pattern
)
'!"
Log-Error
"couldn't find installation package matching '
$(
$Pattern
)
'!"
Exit
Exit
...
@@ -704,7 +704,7 @@ try {
...
@@ -704,7 +704,7 @@ try {
$msg
=
"Updating the service binaries failed,
$(
$Me
)
terminating!"
$msg
=
"Updating the service binaries failed,
$(
$Me
)
terminating!"
Log-Error
$msg
Log-Error
$msg
Send-MailReport
-Subject
"updated failed!"
-Body
$msg
Send-MailReport
-Subject
"updated failed!"
-Body
$msg
Exit
Exit
}
}
Check-PerformanceMonitormembership
Check-PerformanceMonitormembership
}
}
...
@@ -740,4 +740,4 @@ Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails"
...
@@ -740,4 +740,4 @@ Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails"
Upload-LogFiles
Upload-LogFiles
Log-Debug
"
$(
$Me
)
finished."
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