koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Zebra server Daemon


From: btoumi
Subject: [Koha-devel] Zebra server Daemon
Date: Mon, 12 Feb 2007 18:30:21 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20061206)

Hi all ,
I create a file to launch zebra server in daemon mod
it's a service in linux mandriva .
I join this file with this message

#!/bin/bash
#include <unistd.h>
#all path u need especially for the koha.xml file 
PATH=/usr/local/bin:/usr/bin:/etc/koha/:/bin
#path to zebarsrv 
DAEMON=/usr/local/bin/zebrasrv

#just for diplay 
NAME=zebrasrv
DESC="Serveur Zebra"


 

test -x $DAEMON || exit 0


 
# case
case "$1" in
 
#case who start the zebra daemon
    start)
        
 


        echo -n "XXxStarting $DESC: $NAME"
 #-D launch zebra like a daemon
         zebrasrv  -l /path/to/zebralog/ -D -f  /path/to/koha.xml  

        echo "."
        ;;
  

 
#case who stop the zebra daemon
    stop)
 
        echo -n "Stopping $DESC: $NAME"
  

#linux command to stop server
        killall -9 zebrasrv 
        echo "."
        ;;

 
 #case who retstart the zebra daemon
    restart)
 
        echo -n "Restarting $DESC: $NAME"
 
        if [ -z "$(ps ax | egrep zebrasrv)" ]; then
  
  
            echo " zebra isn't running, so not killed" ;
        else
 
       
           killall -9 zebarsrv >& /dev/null ;
        fi
       
        sleep 1
       #-D launch zebra like a daemon
         zebrasrv  -l /path/to/zebralog/ -D -f  /path/to/koha.xml 
        echo "."
        ;;
     
     
    
    *)
        echo "Usage: /etc/init.d/$NAME start|stop|restart" >&2
        exit 1
        ;;
esac

exit 0
## End of script !

reply via email to

[Prev in Thread] Current Thread [Next in Thread]