Module: Luban::Deployment::Packages::Nginx::Controller::Commands
- Included in:
- Luban::Deployment::Packages::Nginx::Configurator, Luban::Deployment::Packages::Nginx::Controller, Installer
- Defined in:
- lib/luban/deployment/packages/nginx/controller.rb
Class Method Summary collapse
Instance Method Summary collapse
- #bin_path ⇒ Object
- #nginx_command ⇒ Object
- #process_pattern ⇒ Object
- #start_command ⇒ Object
- #stop_command ⇒ Object
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 7 def self.included(base) base.define_executable 'nginx' end |
Instance Method Details
#bin_path ⇒ Object
11 12 13 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 11 def bin_path @bin_path ||= install_path.join('sbin') end |
#nginx_command ⇒ Object
15 16 17 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 15 def nginx_command @nginx_command ||= "#{nginx_executable} -c #{control_file_path}" end |
#process_pattern ⇒ Object
19 20 21 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 19 def process_pattern @process_pattern ||= "^nginx: master process #{nginx_command}" end |
#start_command ⇒ Object
23 24 25 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 23 def start_command @start_command ||= shell_command(nginx_command) end |
#stop_command ⇒ Object
27 28 29 |
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 27 def stop_command @stop_command ||= shell_command("#{nginx_command} -s stop") end |