Skip to content

Commit

Permalink
winsvc: require serverengine
Browse files Browse the repository at this point in the history
In #3849, getting ruby's path was replaced with
`ServerEngine.ruby_bin_path` but `require 'serverengine'` was missing.
As a result it fails to launch fluentd service.

Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed Aug 22, 2022
1 parent acfbb09 commit c1f3bd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/fluent/winsvc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
require 'optparse'
require 'win32/daemon'
require 'win32/event'
require 'win32/registry'
require 'serverengine'

include Win32

Expand All @@ -33,7 +35,6 @@
end

def read_fluentdopt(service_name)
require 'win32/registry'
Win32::Registry::HKEY_LOCAL_MACHINE.open("SYSTEM\\CurrentControlSet\\Services\\#{service_name}") do |reg|
reg.read("fluentdopt")[1] rescue ""
end
Expand Down

0 comments on commit c1f3bd4

Please sign in to comment.