2 # $Id: yaz-proxy-ka.sh,v 1.3 2003-10-24 12:35:37 adam Exp $
4 # YAZ proxy keepalive wrapper, use this when testing the proxy.
6 # Allow core dumps when testing.
9 LOGFILE=/var/log/yaz-proxy-ka.log
11 touch $LOGFILE || exit 1
13 while test $i -lt 100; do
15 echo "Starting proxy iteration=$i" >>$LOGFILE
19 echo "Proxy Stopped. Exit code=$code" >>$LOGFILE
20 if test "$code" = "143"; then
21 echo "Got TERM. Exiting" >>$LOGFILE
24 if test "$code" = "129"; then
25 echo "Got HUP. Exiting" >>$LOGFILE
28 if test "$code" = "137"; then
29 echo "Got KILL. Exiting" >>$LOGFILE
32 if test "$code" = "0"; then
33 echo "Exit 0. Exiting" >>$LOGFILE
37 echo "Saving core file" >>$LOGFILE
38 mv -f core core.`date +%Y%m%d%k%M`