redo last
set refrsh meta tag
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/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)
|
# Wait for heartbeat messages and act on them (or their absence)
|
||||||
#
|
#
|
||||||
import time, os, string, sys, socket, atexit, select, SocketServer, getopt
|
import time, os, string, sys, socket, atexit, select, SocketServer, getopt
|
||||||
@@ -303,7 +303,10 @@ def readsock():
|
|||||||
fromaddr(name, addr[0], boot, interval)
|
fromaddr(name, addr[0], boot, interval)
|
||||||
if shutdown:
|
if shutdown:
|
||||||
log("%s shutdown" % name)
|
log("%s shutdown" % name)
|
||||||
|
try:
|
||||||
hosts[name].newstate(Host.down)
|
hosts[name].newstate(Host.down)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
if interval > 0:
|
if interval > 0:
|
||||||
try:
|
try:
|
||||||
hosts[name].interval=interval
|
hosts[name].interval=interval
|
||||||
@@ -367,6 +370,7 @@ class HtmlHandler(SocketServer.BaseRequestHandler):
|
|||||||
if code != 200:
|
if code != 200:
|
||||||
res.append('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">')
|
res.append('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">')
|
||||||
res.append('<html><head>')
|
res.append('<html><head>')
|
||||||
|
res.append('<meta http-equiv=Refresh content=60>')
|
||||||
res.append('<title>%s %s</title>' % (code, cause))
|
res.append('<title>%s %s</title>' % (code, cause))
|
||||||
res.append('</head><body>')
|
res.append('</head><body>')
|
||||||
res.append('<h1>%s</h1>' % (cause))
|
res.append('<h1>%s</h1>' % (cause))
|
||||||
|
|||||||
Reference in New Issue
Block a user