vspheremonitor 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/vspheremonitor +8 -2
- metadata +1 -1
data/bin/vspheremonitor
CHANGED
|
@@ -20,14 +20,20 @@ OptionParser.new do |opts|
|
|
|
20
20
|
options[:verbose] = v
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
opts.on("-c", "--config FILE", "Specify the configuration file") do |
|
|
24
|
-
options[:configfile] =
|
|
23
|
+
opts.on("-c", "--config FILE", "Specify the configuration file") do |conf|
|
|
24
|
+
options[:configfile] = conf
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
end.parse!
|
|
28
28
|
|
|
29
29
|
def run (options)
|
|
30
30
|
|
|
31
|
+
if options[:configfile].nil?
|
|
32
|
+
configfile = 'etc/vsphere.yaml'
|
|
33
|
+
else
|
|
34
|
+
configfile = options[:configfile]
|
|
35
|
+
end
|
|
36
|
+
|
|
31
37
|
configfile = 'etc/vsphere.yaml' if options[:configfile].nil?
|
|
32
38
|
|
|
33
39
|
config = YAML::load(File.read(configfile))
|