Sha256: 9eea56668c9d7d43b986b336667d55ed5c60baf47d232a461238240618b1e035
Contents?: true
Size: 726 Bytes
Versions: 25
Compression:
Stored size: 726 Bytes
Contents
#!/usr/bin/env ruby require 'pathname' # Not using optparse or trollop because they raise on unknown args, and # we want to pass all unknown args to elasticsearch. args = ARGV.join(" ") config_directory_arg = /-c\s+(\S+)\s?/ if dir = args.slice!(config_directory_arg) conf = Pathname.new(config_directory_arg.match(dir)[1]) raise "Must provide the configuration directory." unless conf.directory? ENV['ES_JAVA_OPTS'] = "-Des.path.conf=#{conf.to_s}" if es_include = conf.children(false).detect { |p| p.to_s == "elasticsearch.in.sh" } ENV['ES_INCLUDE'] = (conf + es_include).to_s end end exec (Pathname.new(File.dirname(__FILE__)) + "../vendor/elasticsearch/bin/elasticsearch").realpath.to_s, args.strip
Version data entries
25 entries across 25 versions & 1 rubygems