Skip to content

Commit

Permalink
Set Windows agent startup type to 'Automatic (Delayed Start)'. (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschulz committed Sep 14, 2020
1 parent 0d09c32 commit a1c9673
Showing 1 changed file with 9 additions and 8 deletions.
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

0 comments on commit a1c9673

Please sign in to comment.