From: Adam Dickmeiss Date: Fri, 21 Sep 2001 10:40:08 +0000 (+0000) Subject: Added Redhat boot script for zebrasrv. X-Git-Tag: ZEBRA.1.1~5 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=a82fb3f08b316b5b6d7a512520c2c832ad6bdb09;p=idzebra-moved-to-github.git Added Redhat boot script for zebrasrv. --- diff --git a/util/Makefile.am b/util/Makefile.am index 886e75c..f17b1d8 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,9 +1,11 @@ -## $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@ diff --git a/util/zebrasrv.rh b/util/zebrasrv.rh new file mode 100755 index 0000000..3361f2b --- /dev/null +++ b/util/zebrasrv.rh @@ -0,0 +1,51 @@ +#!/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 +