]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/reload-server.sh
Don't abort startup when setgid/setuid() fails with EINVAL
[ngircd-alex.git] / src / testsuite / reload-server.sh
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   echo " ok".
26   exit 0
27 fi
28 echo " failure: server ${id} could not be restarted"
29 exit 1
30
31 # -eof-