-echo " starting server..."
-../../index/zebrasrv -S -c zebra2.cfg -l srv.log tcp:@:9901 &
-sleep 1
-test -f zebrasrv.pid || exit 1
+LOG=timing1.log
+
+rm -f $LOG
+
+echo " init..." >>$LOG
+
+# these should not be here, will be created later
+$srcdir/cleanrecords.sh
+
+
+../../index/zebraidx -c $srcdir/zebra2.cfg -l $LOG init || exit 1
+
+echo " starting server..." >>$LOG
+../../index/zebrasrv -D -p z.pid -S -c $srcdir/zebra2.cfg -l $LOG unix:socket
+test -f z.pid || exit 1