X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=zabbix%2Fext_boot_state;h=657f208c927019a6e1eb6eadb4c42dd7ecabe64d;hb=24d4dc20f0af32c72d36f122560fb993ce0317ad;hp=d72e12414ca3895367e4ad0a7168fd1372e286d0;hpb=6ed9d7d32f53f2346c4d04e1251628d5ed30af3f;p=monitor.git diff --git a/zabbix/ext_boot_state b/zabbix/ext_boot_state index d72e124..657f208 100755 --- a/zabbix/ext_boot_state +++ b/zabbix/ext_boot_state @@ -35,8 +35,6 @@ def get_state_from_port(host): 'debug' : 3, 'boot' : 4, } - #print "--%s--" % line - #print "--%s--" % type(line) if line.strip() == "" or line.strip() == "Timeout": return mapping["down"] (p22, p80, p806) = line.split() @@ -51,4 +49,5 @@ def get_state_from_port(host): else: return mapping["unknown"] -print get_state_from_port(sys.argv[1]) +if __name__ == "__main__": + print get_state_from_port(sys.argv[1])