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

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_pathObject



11
12
13
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 11

def bin_path
  @bin_path ||= install_path.join('sbin')
end

#nginx_commandObject



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_patternObject



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_commandObject



23
24
25
# File 'lib/luban/deployment/packages/nginx/controller.rb', line 23

def start_command
  @start_command ||= shell_command(nginx_command)
end

#stop_commandObject



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