Sha256: 525dcf5c526c367f2a45809434aa035c7b11ef6c073ff6df1daeb93b2b80e0c9

Contents?: true

Size: 1 KB

Versions: 20

Compression:

Stored size: 1 KB

Contents

require 'optparse'
require 'runit-man/app'

RunitMan.set :active_services_directory, '/etc/service'
RunitMan.set :all_services_directory,    '/etc/sv'

OptionParser.new { |op|
  op.separator 'Server options:'
  op.on('-s server') { |val| RunitMan.set :server, val }
  op.on('-p port')   { |val| RunitMan.set :port, val.to_i }
  op.on('-b addr')   { |val| RunitMan.set :bind, val } if RunitMan.respond_to?(:bind)
  op.separator 'runit options:'
  op.on('-a active_services_directory (/etc/service by default)') { |val| RunitMan.set :active_services_directory, val }
  op.on('-f all_services_directory (/etc/sv by default)')         { |val| RunitMan.set :all_services_directory, val }
  op.separator 'View options:'
  op.on('-v file_location', 'Enables view of specified file through runit-man') { |val| RunitMan.enable_view_of(val) }
  op.separator 'Configuration options:'
  op.on_tail('-r', '--register', 'Register as runit service') do
    RunitMan.register_as_runit_service
    exit
  end
}.parse!(ARGV.dup)

RunitMan.run!

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
runit-man-1.8.4 lib/runit-man/runner.rb
runit-man-1.8.3 lib/runit-man/runner.rb
runit-man-1.8.2 lib/runit-man/runner.rb
runit-man-1.8.1 lib/runit-man/runner.rb
runit-man-1.8.0 lib/runit-man/runner.rb
runit-man-1.7.4 lib/runit-man/runner.rb
runit-man-1.7.3 lib/runit-man/runner.rb
runit-man-1.7.2 lib/runit-man/runner.rb
runit-man-1.7.1 lib/runit-man/runner.rb
runit-man-1.7.0 lib/runit-man/runner.rb
runit-man-1.6.4 lib/runit-man/runner.rb
runit-man-1.6.3 lib/runit-man/runner.rb
runit-man-1.6.2 lib/runit-man/runner.rb
runit-man-1.6.1 lib/runit-man/runner.rb
runit-man-1.6.0 lib/runit-man/runner.rb
runit-man-1.5.4 lib/runit-man/runner.rb
runit-man-1.5.3 lib/runit-man/runner.rb
runit-man-1.5.2 lib/runit-man/runner.rb
runit-man-1.5.1 lib/runit-man/runner.rb
runit-man-1.5.0 lib/runit-man/runner.rb