From: Adam Dickmeiss Date: Thu, 28 Apr 2011 10:38:14 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 X-Git-Tag: v1.5.7~13^2~22^2^2~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=9ab0b75c7b05635b46c24fca561d847400b805f4;p=pazpar2-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 --- 9ab0b75c7b05635b46c24fca561d847400b805f4 diff --cc rpm/pazpar2.init index da5d642,0000000..c57d9e4 mode 100755,000000..100755 --- a/rpm/pazpar2.init +++ b/rpm/pazpar2.init @@@ -1,82 -1,0 +1,82 @@@ +#!/bin/bash +# +# pazpar2 Startup script for Pazpar2 +# - # chkconfig: - 85 15 ++# chkconfig: 2345 85 15 +# description: Pazpar2 Metasearcher +# processname: pazpar2 +# config: /etc/pazpar2/server.xml +# config: /etc/sysconfig/pazpar2 +# pidfile: /var/run/pazpar2.pid + +# Source function library. +OPTIONS="-l /var/log/pazpar2.log -f /etc/pazpar2/server.xml" +. /etc/rc.d/init.d/functions + +if [ -f /etc/sysconfig/pazpar2 ]; then + . /etc/sysconfig/pazpar2 +fi + +# Path to the apachectl script, server binary, and short-form for messages. +DAEMON=${DAEMON-/usr/sbin/pazpar2} +prog=pazpar2 +pidfile=${PIDFILE-/var/run/pazpar2.pid} +lockfile=${LOCKFILE-/var/lock/subsys/pazpar2} +RETVAL=0 + +start() { + echo -n $"Starting $prog: " + daemon --pidfile=${pidfile} $DAEMON $OPTIONS -D -p ${pidfile} + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch ${lockfile} + return $RETVAL +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p ${pidfile} -d 10 $DAEMON + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} +} +reload() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status -p ${pidfile} $DAEMON + RETVAL=$? + ;; + restart) + stop + start + ;; + condrestart) + if [ -f ${pidfile} ] ; then + stop + start + fi + ;; + reload) + reload + ;; + configtest) + $DAEMON $OPTIONS -t + RETVAL=$? + ;; + *) + echo $"Usage: $prog {start|stop|restart|help|configtest}" + exit 1 +esac + +exit $RETVAL