#!/usr/bin/env ruby require 'perus' require 'optparse' options_path = Perus::Pinger::DEFAULT_PINGER_OPTIONS_PATH OptionParser.new do |opts| opts.banner = "Usage: perus-pinger [options]" opts.on('-c', '--config PATH', "Path to config file (default: #{Perus::Pinger::DEFAULT_PINGER_OPTIONS_PATH})") do |c| options_path = c end opts.on('-h', '--help', 'Prints this help') do puts opts exit end end.parse! pinger = Perus::Pinger::Pinger.new(options_path) pinger.run