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

Fix a bug that excessively block to launch #656

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions fluent-package/msi/assets/fluentd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ for %%p in (%*) do (
if "%%p"=="--dry-run" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="--reg-winsvc" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="--reg-winsvc-fluentdopt" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="-h" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="--help" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="--show-plugin-config" set PREVENT_DUPLICATE_LAUNCH=0
if "%%p"=="-v" set HAS_SHORT_VERBOSE_OPTION=1
)

Expand Down
2 changes: 1 addition & 1 deletion fluent-package/templates/usr/sbin/fluentd.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end
if RUBY_PLATFORM =~ /linux/
prevent_duplicate_launch = system("systemctl", "is-active", "fluentd", out: IO::NULL)
if prevent_duplicate_launch
if ["-c", "--config", "--dry-run"].none? {|allowing_opt| ARGV.include? allowing_opt}
if ["-c", "--config", "--dry-run", "-h", "--help", "--show-plugin-config"].none? {|allowing_opt| ARGV.include? allowing_opt}
puts("Error: Can't start duplicate Fluentd instance with the default config.")
if ARGV.include?("-v")
puts("To take the version, please use '--version', not '-v' ('--verbose').")
Expand Down
Loading