1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00
Andrew Tridgell b7e9d0dccf - cleanup persistent db at start
- catch SIGINT and kill daemons

(This used to be ctdb commit d3f5d75665a78ae0081fda57e58384b27a6ae396)
2008-07-30 13:20:47 +10:00

22 lines
384 B
Bash
Executable File

#!/bin/sh
NUMNODES=2
if [ $# -gt 0 ]; then
NUMNODES=$1
fi
trap 'echo "Killing test"; killall -9 -q ctdbd ctdb_fetch; exit 1' INT TERM
tests/start_daemons.sh $NUMNODES || exit 1
killall -9 -q ctdb_fetch
for i in `seq 1 $NUMNODES`; do
$VALGRIND bin/ctdb_fetch --socket sock.$i -n $NUMNODES $* &
done
wait
echo "Shutting down"
bin/ctdb shutdown -n all --socket=sock.1
exit 0