-## $Id: Makefile.am,v 1.2 2001-07-09 23:12:08 adam Exp $
+## $Id: Makefile.am,v 1.3 2001-09-21 10:40:08 adam Exp $
noinst_LIBRARIES = libutil.a
noinst_PROGRAMS = passtest
+EXTRA_DIST = zebrasrv.rh
+
INCLUDES = -I$(srcdir)/../include @YAZINC@
LDADD = libutil.a @YAZLIB@ @LIBS@
--- /dev/null
+#!/bin/bash
+#
+# chkconfig: 2345 85 15
+# description: Redhat init.d zebrasrv script.
+# processname: zebrasrv
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+zebradir=/home/meta/silkeborg/db
+srv=/home/meta/silkeborg/zmbol/index/zmbolsrv
+user=nobody
+
+if [ ! -d ${zebradir} ]; then
+ echo "No directory $zebradir"
+ exit 0
+fi
+
+if [ ! -f ${srv} ]; then
+ echo "No server $srv"
+ exit 0
+fi
+
+cd $zebradir
+
+case "$1" in
+ start)
+ echo -n "Starting zebrasrv "
+
+ ${srv} -l srv.log -u $user tcp:@:210 &
+
+ echo
+ ;;
+ stop)
+ echo -n "Shutting zebrasrv "
+
+ kill `cat $zebradir/zebrasrv.pid`
+
+ echo ""
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: zebrasrv {start|stop|restart|reload}"
+ exit 1
+esac
+
+exit 0
+