987 local array, set = require "util.array", require "util.set"; |
987 local array, set = require "util.array", require "util.set"; |
988 local it = require "util.iterators"; |
988 local it = require "util.iterators"; |
989 local ok = true; |
989 local ok = true; |
990 local function disabled_hosts(host, conf) return host ~= "*" and conf.enabled ~= false; end |
990 local function disabled_hosts(host, conf) return host ~= "*" and conf.enabled ~= false; end |
991 local function enabled_hosts() return it.filter(disabled_hosts, pairs(config.getconfig())); end |
991 local function enabled_hosts() return it.filter(disabled_hosts, pairs(config.getconfig())); end |
|
992 if not (what == nil or what == "disabled" or what == "config" or what == "dns" or what == "certs") then |
|
993 show_warning("Don't know how to check '%s'. Try one of 'config', 'dns', 'certs' or 'disabled'.", what); |
|
994 return 1; |
|
995 end |
992 if not what or what == "disabled" then |
996 if not what or what == "disabled" then |
993 local disabled_hosts = set.new(); |
997 local disabled_hosts = set.new(); |
994 for host, host_options in it.filter("*", pairs(config.getconfig())) do |
998 for host, host_options in it.filter("*", pairs(config.getconfig())) do |
995 if host_options.enabled == false then |
999 if host_options.enabled == false then |
996 disabled_hosts:add(host); |
1000 disabled_hosts:add(host); |