mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 09:17:05 +02:00
Strict detetction fluent-gem command with setup fluentd/td-agent specific
This commit is contained in:
parent
acfb8eb887
commit
b9e4bd7af8
@ -190,11 +190,15 @@ class Plugin
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fluent_gem_path
|
def fluent_gem_path
|
||||||
|
if Fluentd.instance.fluentd?
|
||||||
|
return "fluent-gem" # maybe `fluent-gem` command is in the $PATH
|
||||||
|
end
|
||||||
|
|
||||||
|
# NOTE: td-agent has a command under the /usr/lib{,64}, td-agent2 has under /opt/td-agent
|
||||||
%W(
|
%W(
|
||||||
fluent-gem
|
/opt/td-agent/embedded/bin/fluent-gem
|
||||||
/usr/lib/fluent/ruby/bin/fluent-gem
|
/usr/lib/fluent/ruby/bin/fluent-gem
|
||||||
/usr/lib64/fluent/ruby/bin/fluent-gem
|
/usr/lib64/fluent/ruby/bin/fluent-gem
|
||||||
/opt/td-agent/embedded/bin/fluent-gem
|
|
||||||
).find do |path|
|
).find do |path|
|
||||||
system("which #{path}", out: File::NULL, err: File::NULL)
|
system("which #{path}", out: File::NULL, err: File::NULL)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user