class Luban::Deployment::Packages::Monit::Controller

Public Instance Methods

process_started?() click to toggle source
Calls superclass method
# File lib/luban/deployment/packages/monit/controller.rb, line 62
def process_started?
  super and check_process! =~ /^Monit #{package_major_version} uptime:|^Monit uptime:|^The Monit daemon #{package_major_version} uptime:/
end
process_stopped?() click to toggle source
Calls superclass method
# File lib/luban/deployment/packages/monit/controller.rb, line 58
def process_stopped?
  super and check_process! =~ /the monit daemon is not running$/
end

Protected Instance Methods

check_process!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 76
def check_process!
  capture(check_monitor_command(task.args.service_entry, summary: task.opts.summary))
end
config_test!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 72
def config_test!
  capture(shell_command("#{monit_command} -t"))
end
match_process!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 80
def match_process!
  capture(shell_command("#{monit_command} procmatch #{task.args.pattern}"))
end
monitor_process!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 84
def monitor_process!
  capture(monitor_command(task.args.service_entry))
end
reload_process!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 92
def reload_process!
  capture(reload_monitor_command)
end
unmonitor_process!() click to toggle source
# File lib/luban/deployment/packages/monit/controller.rb, line 88
def unmonitor_process!
  capture(unmonitor_command(task.args.service_entry))
end