$:.push('lib') require 'checks' $checks = Checks::Worker.new pid = nil while true $checks.reload_config Process.kill("TERM", pid) rescue nil if pid pid = Process.fork do $checks.check end Process.detach(pid) sleep(60) end