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 !
participants (1)
-
btoumi