Replaced absolute values from function with global variables

pull/2/head
Aaron Johnson 6 years ago
parent 479cc33833
commit d3bb25758b

@ -24,6 +24,10 @@ admin = @conf['admin']
@probes = @conf['probes']
@tunit = @conf['units']
## Non-configurable
@simplehot = 75
@simplecold = 50
### Begin sanity check ###
STDOUT.sync = true
errcount = 0
@ -172,9 +176,9 @@ def process_tdata(host, simple=false)
if tdata.is_integer?
print tdata + "°#{@tunit}"
if simple #This is mostly just an Easter egg
if tdata.to_i > 75
if tdata.to_i > @simplehot
sdata = "Hot"
elsif tdata.to_i < 50
elsif tdata.to_i < @simplecold
sdata = "Cold"
else
sdata = "Fair"

Loading…
Cancel
Save