[BACK]Return to reload-server.sh CVS log [TXT][DIR] Up to [local] / ircnowd / src / testsuite

Annotation of ircnowd/src/testsuite/reload-server.sh, Revision 1.1.1.1

1.1       tomglok     1: #!/bin/sh
                      2: # ngIRCd Test Suite
                      3:
                      4: [ -z "$srcdir" ] && srcdir=`dirname $0`
                      5:
                      6: # read in functions
                      7: . ${srcdir}/functions.inc
                      8:
                      9: if [ -n "$1" ]; then
                     10:        id="$1"; shift
                     11: else
                     12:        id="1"
                     13: fi
                     14:
                     15: echo_n "reloading server ${id} ..."
                     16:
                     17: # reload (sighup) test-server ...
                     18: pid=`./getpid.sh T-ngircd${id}`
                     19: if [ -z "$pid" ]; then
                     20:   echo " failure: no running server found!?"
                     21:   exit 1
                     22: fi
                     23: kill -HUP $pid > /dev/null 2>&1; r=$?
                     24: if [ $r -eq 0 ]; then
                     25:   sleep 2
                     26:   echo " ok".
                     27:   kill -0 $pid && exit 0
                     28: fi
                     29: echo " failure: server ${id} could not be reloaded!"
                     30: exit 1
                     31:
                     32: # -eof-

CVSweb