Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Windows agent startup type to 'Automatic (Delayed Start)'. #287

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions windows-installer/setup.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Section "Install"

; Trim out newlines as WordFind cannot handle them.
${StrTrimNewLines} $3 "$2"

; Look for 'WIN_EVT_POS_FILE_PLACE_HOLDER', if found replace it with the
; proper pos_file.
${WordFind} "$3" "WIN_EVT_POS_FILE_PLACE_HOLDER" "#" $4
Expand Down Expand Up @@ -262,15 +262,16 @@ Section "Install"
pristine --all --only-executables"

; Start the fluentd service and show status.
; '--reg-winsvc i' -> Install as a windows service
; '--reg-winsvc-auto-start' -> Enables the service to auto start at boot
; '--reg-winsvc-fluentdopt' -> Passes along the config file
; '--winsvc-name' -> The service name the agent will run as
; '--winsvc-display-name' -> The display name of service
; '--winsvc-desc' -> A description of the service
; '--reg-winsvc i' -> Install as a windows service
; '--reg-winsvc-auto-start' -> Set service to start automatically (at boot)
; '--reg-winsvc-delay-start' -> Delay auto-start until shortly after boot
; '--reg-winsvc-fluentdopt' -> Pass along the config file
; '--winsvc-name' -> The service name the agent will run as
; '--winsvc-display-name' -> The display name of service
; '--winsvc-desc' -> A description of the service
${Print} "Starting the ${DISPLAY_NAME}..."
${ExecuteCommand} "${MAIN_INSTDIR}\bin\fluentd.bat" \
"--reg-winsvc i --reg-winsvc-auto-start \
"--reg-winsvc i --reg-winsvc-auto-start --reg-winsvc-delay-start \
--reg-winsvc-fluentdopt $\"-c $\'${FLUENTD_CONFIG_LOCATION}$\' -o $\'${FLUENTD_LOG_LOCATION}$\'$\" \
--winsvc-name $\"${PRODUCT}Logging$\" \
--winsvc-display-name $\"${PRODUCT} Logging$\" \
Expand Down