diff --git a/hbd b/hbd index 45c9174..d773a08 100755 --- a/hbd +++ b/hbd @@ -1,5 +1,5 @@ #!/usr/bin/env python -# $Id: hbd,v 1.17 2007/07/11 19:50:06 andreas Exp $ +# $Id: hbd,v 1.18 2010/04/02 11:09:05 andreas Exp $ # Wait for heartbeat messages and act on them (or their absence) # import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle @@ -365,6 +365,7 @@ class HtmlHandler(SocketServer.BaseRequestHandler): def handle(self): f=self.request.makefile() + url='/unknown' while 1: line=string.strip(f.readline()) if len(line) == 0: diff --git a/hbd.sh b/hbd.sh new file mode 100755 index 0000000..abfbb6e --- /dev/null +++ b/hbd.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# $Id: hbd.sh,v 1.1 2010/04/02 11:09:05 andreas Exp $ +while true; do + /home/andreas/bin/hbd -f > /tmp/hbd.$$.log 2>&1 + cat /tmp/hbd.$$.log | mail -s "hbd died" andreas@wrede.ca + sleep 10 +done