Module: Luban::Deployment::Applications::Fluentd::Controller::Commands

Included in:
Luban::Deployment::Applications::Fluentd::Configurator, Luban::Deployment::Applications::Fluentd::Controller
Defined in:
lib/luban/deployment/applications/fluentd/controller.rb

Instance Method Summary collapse

Instance Method Details

#process_patternObject



7
8
9
# File 'lib/luban/deployment/applications/fluentd/controller.rb', line 7

def process_pattern
  @process_pattern ||= "^supervisor:#{env_name}"
end

#start_commandObject



11
12
13
# File 'lib/luban/deployment/applications/fluentd/controller.rb', line 11

def start_command
  @start_command ||= bundle_command("fluentd -c #{control_file_path} -d #{pid_file_path} -o #{log_file_path}")
end

#stop_commandObject



15
16
17
# File 'lib/luban/deployment/applications/fluentd/controller.rb', line 15

def stop_command
  @stop_command ||= shell_command("kill $(cat #{pid_file_path} 2>/dev/null)")
end