Skip to content

logstash /usr/share/logstash/bin/system-install -h | --help message incorrect #12145

@thanh-lam

Description

@thanh-lam
  • Version: 7.5.1 or newer
  • Operating System: RHEL 8.1 or other
  • Steps to Reproduce:
  1. cd to /usr/share/logstash/bin/
  2. Run ./system-install -h or ./system-install --help
  3. Note help messages as following:
# ./system-install -h
Usage: system-install [OPTIONSFILE] [STARTUPTYPE] [VERSION]

NOTE: These arguments are ordered, and co-dependent

OPTIONSFILE: Full path to a startup.options file
OPTIONSFILE is required if STARTUPTYPE is specified, but otherwise looks first
in /usr/share/logstash/config/startup.options and then /etc/logstash/startup.options
Last match wins

STARTUPTYPE: e.g. sysv, upstart, systemd, etc.
OPTIONSFILE is required to specify a STARTUPTYPE.

VERSION: The specified version of STARTUPTYPE to use.  The default is usually
preferred here, so it can safely be omitted.
Both OPTIONSFILE & STARTUPTYPE are required to specify a VERSION.

For more information, see https://github.com/jordansissel/pleaserun

The part about OPTIONSFILE is in conflict with the code in the script system-install:

OPTIONSFILE is required if STARTUPTYPE is specified, but otherwise looks first
in /usr/share/logstash/config/startup.options and then /etc/logstash/startup.options
Last match wins

The script looks first in /etc/logstash/startup.options and then `/usr/share/logstash/config/startup.options:

if [ -z "$1" ]; then
  if [ -r /etc/logstash/startup.options ]; then
    OPTIONS_PATH=/etc/logstash/startup.options
  elif [ -r "${LOGSTASH_HOME}"/config/startup.options ]; then
    OPTIONS_PATH="${LOGSTASH_HOME}"/config/startup.options
  fi
elif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions