module DAF

Starts the DAF daemon (DAD) - takes a directory containing the YAML files for monitor/action pairs After parsing configuration, will daemonize and continue monitoring until SIGTERM is received

@author Kayla McArthur (kayla@kayla.is) @icense MIT License

DAF module version numbering

Constants

VERSION

Public Instance Methods

print_usage() click to toggle source
start_dad() click to toggle source
# File lib/daf.rb, line 11
def start_dad
  if ARGV[0] && File.directory?(ARGV[0])
    commands = []

    Dir[ARGV[0] + '/*.yaml'].each do |file|
      commands << Command.new(YAMLDataSource.new(file))
    end

    dad = DynamicActionDaemon.new(commands)
    dad.start
  else
    print_usage
  end
end