3 # metaproxy Startup script for Metaproxy
5 # chkconfig: 2345 85 15
6 # description: Metaproxy SRU/Z39.50 router
7 # processname: metaproxy
8 # config: /etc/metaproxy/metaproxy.xml
9 # config: /etc/sysconfig/metaproxy
10 # pidfile: /var/run/metaproxy.pid
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 OPTIONS="-u nobody -l /var/log/metaproxy.log -c /etc/metaproxy/metaproxy.xml"
17 if [ -f /etc/sysconfig/metaproxy ]; then
18 . /etc/sysconfig/metaproxy
21 DAEMON=${DAEMON-/usr/bin/metaproxy}
23 pidfile=${PIDFILE-/var/run/metaproxy.pid}
24 lockfile=${LOCKFILE-/var/lock/subsys/metaproxy}
28 echo -n $"Starting $prog: "
29 daemon --pidfile=${pidfile} $DAEMON $OPTIONS -D -p ${pidfile}
32 [ $RETVAL = 0 ] && touch ${lockfile}
37 echo -n $"Stopping $prog: "
38 killproc -p ${pidfile} -d 10 $DAEMON
41 [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
48 # See how we were called.
57 status -p ${pidfile} $DAEMON
65 if [ -f ${pidfile} ] ; then
78 echo $"Usage: $prog {start|stop|restart|help|configtest}"