Sha256: 82c6fd435085ac682f899f0c079e2475fb00b29d6399cb49ad4cb03e07d6379c

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

#!/usr/bin/env ruby
require 'pathname'

source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
$LOAD_PATH << source_path

require 'zombie_check'

if ['-v', '--version'].include? ARGV[0]
  puts "Version #{ZombieCheck::VERSION}"
  exit 0
elsif ['-h', '--help'].include? ARGV[0]
  puts 'You can specify options with syntax like option_name:value'
  puts 'hosts_file   - file with list of all hosts'
  puts "delay        - delay between pings in ms, default 1000 \n\n"
  exit 0
end

options = {}.tap do |result|
  ARGV.each do |argv|
    split_args = argv.split ':'
    result[split_args.first.to_sym] = split_args.last
  end
end

ZombieCheck::Ping::Checker.new(options).start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zombie_check-0.1.1 bin/zombie_check