Skip to content

Commit

Permalink
use environment variables in install-service.ps1 template (#22874) (#…
Browse files Browse the repository at this point in the history
…22900)

- replace hard coded C:\ProgramData with $env:PROGRAMDATA

(cherry picked from commit 3910e8b)
  • Loading branch information
leehinman authored Dec 10, 2020
1 parent 3895e3a commit 1872cb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix duplicated pod events in kubernetes autodiscover for pods with init or ephemeral containers. {pull}22438[22438]
- Fix index template loading when the new index format is selected. {issue}22482[22482] {pull}22682[22682]
- Log debug message if the Kibana dashboard can not be imported from the archive because of the invalid archive directory structure {issue}12211[12211], {pull}13387[13387]
- Use PROGRAMDATA environment variable instead of C:\ProgramData for windows install service {pull}22874[22874]


*Auditbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $workdir = Split-Path $MyInvocation.MyCommand.Path
# Create the new service.
New-Service -name {{.BeatName}} `
-displayName {{.BeatName | title}} `
-binaryPathName "`"$workdir\{{.BeatName}}.exe`" --environment=windows_service -c `"$workdir\{{.BeatName}}.yml`" --path.home `"$workdir`" --path.data `"C:\ProgramData\{{.BeatName}}`" --path.logs `"C:\ProgramData\{{.BeatName}}\logs`" -E logging.files.redirect_stderr=true"
-binaryPathName "`"$workdir\{{.BeatName}}.exe`" --environment=windows_service -c `"$workdir\{{.BeatName}}.yml`" --path.home `"$workdir`" --path.data `"$env:PROGRAMDATA\{{.BeatName}}`" --path.logs `"$env:PROGRAMDATA\{{.BeatName}}\logs`" -E logging.files.redirect_stderr=true"

# Attempt to set the service to delayed start using sc config.
Try {
Expand Down

0 comments on commit 1872cb8

Please sign in to comment.