Module: Luban::Deployment::Packages::Elasticsearch::Controller::Commands
- Included in:
- Luban::Deployment::Packages::Elasticsearch::Configurator, Luban::Deployment::Packages::Elasticsearch::Controller
- Defined in:
- lib/luban/deployment/packages/elasticsearch/controller.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/luban/deployment/packages/elasticsearch/controller.rb', line 7 def self.included(base) base.define_executable 'elasticsearch' end |
Instance Method Details
#java_bin_path ⇒ Object
11 12 13 |
# File 'lib/luban/deployment/packages/elasticsearch/controller.rb', line 11 def java_bin_path @java_bin_path ||= package_bin_path('java') end |
#process_pattern ⇒ Object
15 16 17 |
# File 'lib/luban/deployment/packages/elasticsearch/controller.rb', line 15 def process_pattern @process_pattern ||= "#{control_path}$" end |
#start_command ⇒ Object
19 20 21 |
# 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 ⇒ Object
23 24 25 |
# 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 |