diff options
author | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 16:14:51 -0200 |
---|---|---|
committer | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 16:14:51 -0200 |
commit | 9168cfecdb6f16d219c08193f952e331baaa7c93 (patch) | |
tree | fc02f075a7d701684a337ab50d0bafdb6e1cff5a /lib/oxidized/config.rb | |
parent | a442dcd5eb7ac433c7041459ba6adf4e003b88a3 (diff) |
use `OXIDIZED_HOME` env variable for root config directory
this provides a way to isolate the oxidized without touching the
user home directory, useful for init.d scripts and others.
Diffstat (limited to 'lib/oxidized/config.rb')
-rw-r--r-- | lib/oxidized/config.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/config.rb b/lib/oxidized/config.rb index d2d12d8..7884625 100644 --- a/lib/oxidized/config.rb +++ b/lib/oxidized/config.rb @@ -3,7 +3,7 @@ module Oxidized class NoConfig < OxidizedError; end class InvalidConfig < OxidizedError; end class Config - Root = File.join ENV['HOME'], '.config', 'oxidized' + Root = ENV['OXIDIZED_HOME'] || File.join(ENV['HOME'], '.config', 'oxidized') Crash = File.join Root, 'crash' Log = File.join Root, 'log' InputDir = File.join Directory, %w(lib oxidized input) @@ -27,7 +27,7 @@ module Oxidized asetus.default.timeout = 20 asetus.default.retries = 3 asetus.default.prompt = /^([\w.@-]+[#>]\s?)$/ - asetus.default.rest = '127.0.0.1:8888' # or false to disable + asetus.default.rest = '127.0.0.1:8888' # or false to disable asetus.default.vars = {} # could be 'enable'=>'enablePW' asetus.default.groups = {} # group level configuration |