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
8304ebbd
Commit
8304ebbd
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Define ServiceLog as a global variable.
parent
a2dd1b45
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
Scripts/Install-Service.ps1
+4
-3
4 additions, 3 deletions
Scripts/Install-Service.ps1
with
4 additions
and
3 deletions
Scripts/Install-Service.ps1
+
4
−
3
View file @
8304ebbd
...
...
@@ -36,7 +36,7 @@ function Start-MyService {
Write-Host
"Please check if your configuration is valid!"
Write-Host
"Showing last 20 lines of service log file:"
Write-Host
"=========================================="
Get-Content
"
$(
$Service
Dir
)
\service.l
og
"
-Tail
20
Get-Content
$Service
L
og
-Tail
20
}
}
...
...
@@ -66,8 +66,8 @@ function Copy-ServiceFiles {
Copy-Item
-Recurse
-Force
-Path
"
$ServiceName
\*"
-Destination
$ServiceDir
-ErrorAction
Stop
Copy-FileIfNew
"configuration.xml"
$ServiceDir
Copy-FileIfNew
"status.xml"
$ServiceDir
Copy-FileIfNew
"service.log"
$Service
Dir
Clear-Content
"
$(
$Service
Dir
)
\service.l
og
"
Copy-FileIfNew
"service.log"
$Service
Log
Clear-Content
$Service
L
og
Write-Host
"[OK]"
-Fore
Green
}
catch
{
...
...
@@ -100,6 +100,7 @@ if (Test-Path $LocalConfiguration) {
Exit
}
$ServiceLog
=
"
$(
$ServiceDir
)
\
$(
$ServiceName
)
.log"
try
{
$Service
=
Get-Service
$ServiceName
-ErrorAction
Stop
...
...
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