module Luban::Deployment::Packages::Elasticsearch::Controller::Commands
Public Class Methods
included(base)
click to toggle source
# File lib/luban/deployment/packages/elasticsearch/controller.rb, line 7 def self.included(base) base.define_executable 'elasticsearch' end
Public Instance Methods
java_bin_path()
click to toggle source
# File lib/luban/deployment/packages/elasticsearch/controller.rb, line 11 def java_bin_path @java_bin_path ||= package_bin_path('java') end
process_pattern()
click to toggle source
# File lib/luban/deployment/packages/elasticsearch/controller.rb, line 15 def process_pattern @process_pattern ||= "#{control_path}$" end
start_command()
click to toggle source
# File lib/luban/deployment/packages/elasticsearch/controller.rb, line 19 def start_command @start_command ||= shell_command("PATH=#{java_bin_path}:$PATH #{elasticsearch_executable} -d -p #{pid_file_path} --path.conf=#{control_path}") end
stop_command()
click to toggle source
# File lib/luban/deployment/packages/elasticsearch/controller.rb, line 23 def stop_command @stop_command ||= shell_command("kill $(cat #{pid_file_path} 2>/dev/null)") end