Sha256: e3eec7a17fd60167b8569191a56690a377c6e5ac03d4cfd6fb5473f0c4afdf11
Contents?: true
Size: 680 Bytes
Versions: 1
Compression:
Stored size: 680 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'daemons' require 'logger' require File.dirname(__FILE__) + '/../lib/heartbeat-client' begin puts "Using config in your home directory" @config = YAML.load(File.read("#{ENV['HOME']}/.heartbeat-client.yml")) rescue Errno::ENOENT raise "heartbeat-client.yml expected in ~/.heartbeat-client.yml" end unless @config['apikey'] puts "API Key not found!" exit end if ARGV and ARGV.size == 1 Daemons.run_proc('heartbeat-client.rb') do loop do Heartbeat.create(@config['apikey'], @config['endpoint'], @config['name']) sleep(30) end end else puts "Please provide a command to hbc (start|stop|run)!" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heartbeat-client-0.3.0 | bin/hbc |