|
|
|
@ -32,6 +32,18 @@ admin = @conf['admin']
|
|
|
|
|
STDOUT.sync = true
|
|
|
|
|
errcount = 0
|
|
|
|
|
puts "Checking if environment is sane...\n\n"
|
|
|
|
|
print "Checking system utilities ............... "
|
|
|
|
|
if !system("which nmap 2>&1 >/dev/null")
|
|
|
|
|
print "FAIL!\n\n".red.bold
|
|
|
|
|
puts "nmap".yellow.bold + " not found. This utility requires the 'nmap' command (for testing connectivity to temperature probes)"
|
|
|
|
|
exit(1)
|
|
|
|
|
elsif !system("which curl 2>&1 >/dev/null")
|
|
|
|
|
print "FAIL!\n\n".red.bold
|
|
|
|
|
puts "curl".yellow.bold + " not found. This utility requires the 'curl' command (for providing IP information to users upon request)"
|
|
|
|
|
exit(1)
|
|
|
|
|
else
|
|
|
|
|
print "OK\n".green.bold
|
|
|
|
|
end
|
|
|
|
|
print "Checking bot token ...................... "
|
|
|
|
|
if @token.nil?
|
|
|
|
|
print "FAIL!\n\n".red.bold
|
|
|
|
|