Skip to content

Commit

Permalink
Add command line option to dump full configuration
Browse files Browse the repository at this point in the history
Closes ytti#1588
  • Loading branch information
ytti authored and RobbFromIT committed Nov 30, 2018
1 parent bd2aa0a commit 42f87d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/oxidized
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
trap("INT") { exit } # sinatra will otherwise steal this from us

begin
require 'oxidized/cli'
require_relative '../lib/oxidized/cli'
Oxidized::CLI.new.run
rescue => error
warn "#{error}"
Expand Down
5 changes: 5 additions & 0 deletions lib/oxidized/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def parse_opts
opts = Slop.new(:help => true) do
on 'd', 'debug', 'turn on debugging'
on 'daemonize', 'Daemonize/fork the process'
on 'show-exhaustive-config', 'output entire configuration, including defaults' do
asetus = Config.load
puts asetus.to_yaml asetus.cfg
Kernel.exit
end
on 'v', 'version', 'show version' do
puts Oxidized::VERSION_FULL
Kernel.exit
Expand Down

0 comments on commit 42f87d4

Please sign in to comment.