redo last

set refrsh meta tag
This commit is contained in:
andreas
2006-04-28 12:23:59 +00:00
parent 8c2bdc1500
commit f921cb1834
+5 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# $Id: hbd,v 1.9 2006/04/28 12:15:13 andreas Exp $
# $Id: hbd,v 1.10 2006/04/28 12:23:59 andreas Exp $
# Wait for heartbeat messages and act on them (or their absence)
#
import time, os, string, sys, socket, atexit, select, SocketServer, getopt
@@ -303,7 +303,10 @@ def readsock():
fromaddr(name, addr[0], boot, interval)
if shutdown:
log("%s shutdown" % name)
try:
hosts[name].newstate(Host.down)
except:
pass
if interval > 0:
try:
hosts[name].interval=interval
@@ -367,6 +370,7 @@ class HtmlHandler(SocketServer.BaseRequestHandler):
if code != 200:
res.append('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">')
res.append('<html><head>')
res.append('<meta http-equiv=Refresh content=60>')
res.append('<title>%s %s</title>' % (code, cause))
res.append('</head><body>')
res.append('<h1>%s</h1>' % (cause))