Sha256: 68e524f0a0d2be83d774319b4d3ff8377d2604f317d9c88152a11e065d29ea3c
Contents?: true
Size: 981 Bytes
Versions: 3
Compression:
Stored size: 981 Bytes
Contents
#!/usr/bin/env ruby require 'rack' require 'optparse' require 'web-puppet' options = {:daemonize => true, :port => 9295, :config => false} optparse = OptionParser.new do |opts| opts.banner = 'Usage: web-puppet [options] ...' opts.separator '' opts.separator 'Configuration options:' opts.on( '--no-daemonize', "Don't daemonize the web server process") do |username| options[:daemonize] = false end opts.on( '-p', '--port PORT', 'The port to run web-puppet on') do |port| options[:port] = port end opts.on( '-c', '--config FILE', 'The file to load with configuration options') do |file| options[:config] = file end opts.on_tail('-h', '--help', 'Display this screen' ) do puts opts exit end end begin optparse.parse! WebPuppet::App.run!(options) rescue OptionParser::InvalidArgument, OptionParser::InvalidOption, OptionParser::MissingArgument puts $!.to_s puts optparse exit rescue Errno::EACCES puts $!.to_s exit end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
web-puppet-0.2.0 | bin/web-puppet |
web-puppet-0.1.1 | bin/web-puppet |
web-puppet-0.1.0 | bin/web-puppet |