M #-: auto for dummy monitoring. Checks

This commit is contained in:
Ruben S. Montero committed 2020-05-26 16:08:33 +02:00
1 parent 2c19a586d0
commit e28f5d8d01
1 file changed
+6 -2
@@ -170,10 +170,14 @@ begin
hostid = config.elements['HOST_ID'].text.to_s
if host == 'auto'
if local? hyperv
if local? hyperv || hyperv == 'dummy'
host = '127.0.0.1'
else
host = ENV['SSH_CLIENT'].split.first
begin
host = ENV['SSH_CLIENT'].split.first
rescue
host = ''
end
if host.to_s.empty?
puts 'NETWORK/MONITOR_ADDRESS is "auto", but SSH_CLIENT unknown'