Sha256: 99c251880363066b17e77fc9774743c08a8428c6d5c4e6cb097bb64a6b193454

Contents?: true

Size: 971 Bytes

Versions: 3

Compression:

Stored size: 971 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'rubygems'
require 'evented_bluepill'
require 'logger'

# ATTENTION:
# You must declare only one application per config when foreground mode specified
#
# http://github.com/akzhan/runit-man used as example of monitored application.

EventedBluepill.application(:runit_man, :foreground => true) do |app|
  app.process("runit-man") do |process|
    process.pid_file = "/etc/service/runit-man/supervise/pid"
      
    process.start_command   = "/usr/bin/sv start runit-man"
    process.stop_command    = "/usr/bin/sv stop runit-man"
    process.restart_command = "/usr/bin/sv restart runit-man"
      
    process.start_grace_time   = 1.seconds
    process.restart_grace_time = 7.seconds
    process.stop_grace_time    = 7.seconds

    process.checks :http, :within => 30.seconds, :retry_in => 7.seconds, :every => 30.seconds,
      :url => 'http://localhost:4567/', :kind => :success, :pattern => /html/, :timeout => 3.seconds
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evented_bluepill-0.0.52 example/runit_example.rb
evented_bluepill-0.0.51 example/runit_example.rb
evented_bluepill-0.0.50 example/runit_example.rb