X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zebra%2Finit-script;h=cf321a8298a0bc9704736613259b14d1435b9a54;hb=1a908ca46c767ce1ece36803c2ea59cf1819974b;hp=36b88f3a2df9659e05ff5bac5b5d6f7ab699809c;hpb=95b8297c8584bb441f9cda2bcc24d4866a8121e8;p=irspy-moved-to-github.git diff --git a/zebra/init-script b/zebra/init-script index 36b88f3..cf321a8 100755 --- a/zebra/init-script +++ b/zebra/init-script @@ -1,6 +1,15 @@ #! /bin/sh +### BEGIN INIT INFO +# Provides: irspy-zebra +# Required-Start: $local_fs $remote_fs $network $named $time +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Controls the irspy-zebra daemon +# Description: Controls the ID IRSpy Zebra server daemon +# /usr/bin/zebrasrv-2.0 . +### END INIT INFO -# $Id: init-script,v 1.5 2007-03-15 16:00:31 mike Exp $ # # This is a startup/shutdown script for IRSpy's Zebra server, suitable # for use in a SysV-style init directory such as /etc/init.d (on @@ -15,12 +24,19 @@ # zebrasrv-2.0 may be in /usr/local/bin, hence this slight security hole PATH=/bin:/usr/bin:/usr/local/bin/ -logfile=/var/log/irspy-zebra +logfile=/var/log/irspy-zebra.log pidfile=/var/run/irspy-zebra.pid case "`hostname`" in - xeno|test) IRSPYDIR=/usr/local/src/cvs/irspy/;; - shawarma) IRSPYDIR=/home/mike/cvs/irspy/;; + nigiri | xeno | rafa | test) IRSPYDIR=/usr/local/src/git/irspy/;; + shawarma|kafta) IRSPYDIR=/home/mike/cvs/irspy/;; + berwick ) IRSPYDIR=/home/indexdata/irspy/ ;; + + your-development-machine ) + IRSPYDIR=/home/foobar/indexdata/irspy/ + logfile=$IRSPYDIR/irspy-zebra + pidfile=$IRSPYDIR/irspy-zebra.pid + ;; *) echo "$0: unsupported host `hostname`" >&2 exit 1;; esac @@ -35,7 +51,7 @@ case "$1" in # Let log rotation take care of backups #test -f $logfile && mv -f $logfile $logfile.old ( cd $IRSPYDIR/zebra - zebrasrv-2.0 -f yazserver.xml < /dev/null >> $logfile 2>&1 & + zebrasrv-2.0 -f $(pwd)/yazserver.xml < /dev/null >> $logfile 2>&1 & echo $! > $pidfile ) ;; @@ -55,3 +71,4 @@ case "$1" in echo "Usage: $0 start|stop|restart" >&2 ;; esac +