From: Adam Dickmeiss Date: Fri, 23 Apr 2004 16:10:24 +0000 (+0000) Subject: Rename yaz-proxy.sh to yazproxyctl.sh X-Git-Tag: YAZPROXY.0.8~2 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=7767f42f8aa5359239cfe3dd99ee18b6fb23546f;p=yazproxy-moved-to-github.git Rename yaz-proxy.sh to yazproxyctl.sh --- diff --git a/NEWS b/NEWS index 5976f25..6b81f5a 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ --- 0.8 not yet released +YAZ proxy control script renamed from yaz-proxy.sh to yazproxyctl.sh. + +YAZ proxy executable renamed from yaz-proxy to yaz-proxy. + Older versions of YAZ proxy was part of YAZ++. We've split the YAZ proxy into a separate project. diff --git a/doc/installation.xml b/doc/installation.xml index 58c8f8f..bf02c66 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -1,5 +1,5 @@ - + Installation You need a C++ compiler to compile and use YAZ proxy. @@ -117,8 +117,11 @@ etc - Various files that may be read by YAZ proxy - including - configuration file, XSLT files, CQL to RPN conversion. + Various files such as + configuration files, XSLT files, CQL to RPN conversion files, + a sample start/stop control script + yazproxy.ctl.sh that can be used as + template for an /etc/init.d script. These files are installed in the YAZ proxy's data area (prefix/share/yazproxy). diff --git a/etc/Makefile.am b/etc/Makefile.am index 8e7ab90..4aba48b 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am,v 1.2 2004-04-19 13:42:52 adam Exp $ +# $Id: Makefile.am,v 1.3 2004-04-23 16:10:24 adam Exp $ proxydatadir=$(datadir)/yazproxy proxydata_DATA = \ @@ -13,8 +13,8 @@ proxydata_DATA = \ pqf.properties \ yazproxy.xsd \ zeerex-2.0.xsd \ - yaz-proxy.sh + yazproxyctl.sh EXTRA_DIST = $(proxydata_DATA) -noinst_SCRIPTS = yaz-proxy.sh +noinst_SCRIPTS = yazproxyctl.sh diff --git a/etc/yaz-proxy.sh b/etc/yaz-proxy.sh deleted file mode 100755 index c561117..0000000 --- a/etc/yaz-proxy.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# $Id: yaz-proxy.sh,v 1.2 2004-04-11 14:45:13 adam Exp $ -# YAZ proxy start/stop init.d script. -# -PATH=/usr/local/bin:/bin:/usr/bin -export PATH - -# Proxy CWD is here. Should be writable by it. -DIR=/var/yazproxy -# Proxy Path -DAEMON=/usr/local/bin/yazproxy - -# Proxy PIDFILE. Must be writable by it. -PIDFILE="/var/run/yazproxy.pid" - -# Log file -LOGFILE=/var/log/yazproxy.log - -# Port -PORT=9000 - -# Run as this user. Set to empty to keep uid as is -RUNAS=nobody - -# Extra args . Config file _WITH_ option -ARGS="-c config.xml" - -if test -n "RUNAS"; then - ARGS="-u $RUNAS $ARGS" -fi - -# Increase number of sockets, if needed -#ulimit -n 1050 - -# Name, Description (not essential) -NAME=yazproxy -DESC="YAZ proxy" - -test -d $DIR || exit 0 -test -f $DAEMON || exit 0 - -set -e - -case "$1" in - start) - printf "%s" "Starting $DESC: " - cd $DIR - $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT & - echo "$NAME." - ;; - stop) - printf "%s" "Stopping $DESC: " - - if test -f $PIDFILE; then - kill `cat $PIDFILE` - rm -f $PIDFILE - echo "$NAME." - else - echo "No PID $PIDFILE" - fi - ;; - reload) - if test -f $PIDFILE; then - kill -HUP `cat $PIDFILE` - fi - ;; - restart|force-reload) - printf "%s" "Restarting $DESC: " - if test -f $PIDFILE; then - kill `cat $PIDFILE` - rm -f $PIDFILE - fi - sleep 1 - cd $DIR - $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT & - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/etc/yazproxyctl.sh b/etc/yazproxyctl.sh new file mode 100755 index 0000000..893423f --- /dev/null +++ b/etc/yazproxyctl.sh @@ -0,0 +1,86 @@ +#!/bin/sh +# $Id: yazproxyctl.sh,v 1.1 2004-04-23 16:10:24 adam Exp $ +# YAZ proxy start/stop init.d script. +# +PATH=/usr/local/bin:/bin:/usr/bin +export PATH + +# Proxy CWD is here. Should be writable by it. +DIR=/var/yazproxy +# Proxy Path +DAEMON=/usr/local/bin/yazproxy + +# Proxy PIDFILE. Must be writable by it. +PIDFILE="/var/run/yazproxy.pid" + +# Log file +LOGFILE=/var/log/yazproxy.log + +# Port +PORT=9000 + +# Run as this user. Set to empty to keep uid as is +RUNAS=nobody + +# Extra args . Config file _WITH_ option +ARGS="-c config.xml" + +if test -n "RUNAS"; then + ARGS="-u $RUNAS $ARGS" +fi + +# Increase number of sockets, if needed +#ulimit -n 1050 + +# Name, Description (not essential) +NAME=yazproxy +DESC="YAZ proxy" + +test -d $DIR || exit 0 +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + printf "%s" "Starting $DESC: " + cd $DIR + $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT & + echo "$NAME." + ;; + stop) + printf "%s" "Stopping $DESC: " + + if test -f $PIDFILE; then + kill `cat $PIDFILE` + rm -f $PIDFILE + echo "$NAME." + else + echo "No PID $PIDFILE" + fi + ;; + reload) + if test -f $PIDFILE; then + kill -HUP `cat $PIDFILE` + fi + ;; + restart|force-reload) + printf "%s" "Restarting $DESC: " + if test -f $PIDFILE; then + kill `cat $PIDFILE` + rm -f $PIDFILE + fi + sleep 1 + cd $DIR + $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT & + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0