From: Adam Dickmeiss Date: Thu, 23 Oct 2003 14:19:16 +0000 (+0000) Subject: Move config.xml, yaz-proxy.sh to etc X-Git-Tag: YAZPP.0.7.2~7 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ab42ade0e6fe70998e8fe70338b2d78008d388f7;p=yazpp-moved-to-github.git Move config.xml, yaz-proxy.sh to etc --- diff --git a/Makefile.am b/Makefile.am index 9d9a06f..85625d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = src include zoom lib doc +SUBDIRS = src include zoom lib etc doc EXTRA_DIST= LICENSE README.txt TODO ChangeLog yaz++-config.in diff --git a/configure.in b/configure.in index 84a7c3c..bd9d37e 100644 --- a/configure.in +++ b/configure.in @@ -107,4 +107,5 @@ AC_OUTPUT([ doc/yaz++.xml doc/yazprint.dsl doc/yazphp.dsl doc/yazhtml.dsl doc/tkl.xsl + etc/Makefile ],[sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz++-config >src/yaz++-config && chmod +x yaz++-config src/yaz++-config]) diff --git a/etc/Makefile.am b/etc/Makefile.am new file mode 100644 index 0000000..d57e0cc --- /dev/null +++ b/etc/Makefile.am @@ -0,0 +1,4 @@ + +EXTRA_DIST = config.xml yaz-proxy.sh + +noinst_SCRIPTS = yaz-proxy.sh diff --git a/etc/config.xml b/etc/config.xml new file mode 100644 index 0000000..488b6d7 --- /dev/null +++ b/etc/config.xml @@ -0,0 +1,52 @@ + + + + + + bagel.indexdata.dk + 240 + 180 + + 1000000 + 1000 + + + 2000000 + 50 + 100 + + + + + + + + + 0 + + + localhost:9999 + localhost:9998 + 300 + 180 + + + 50000 + 60 + 10 + + + + + + + + + 2 + + + + + 50 + client-apdu server-apdu + diff --git a/etc/yaz-proxy.sh b/etc/yaz-proxy.sh new file mode 100755 index 0000000..757e240 --- /dev/null +++ b/etc/yaz-proxy.sh @@ -0,0 +1,90 @@ +#!/bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl +# +PATH=/usr/local/bin:/bin:/usr/bin +export PATH + +# Proxy CWD is here. Should be writable by it. +DIR=/var/yaz-proxy +# Proxy Path +DAEMON="/usr/local/bin/yaz-proxy" + +# Proxy PIDFILE. Must be writable by it. +PIDFILE="/var/run/yaz-proxy.pid" + +# Log file +LOGFILE=/var/log/yaz-proxy.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 + +# Name, Description (not essential) +NAME=yaz-proxy +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/src/Makefile.am b/src/Makefile.am index 95be80e..0d8e560 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.18 2003-10-23 12:14:48 adam Exp $ +## $Id: Makefile.am,v 1.19 2003-10-23 14:19:16 adam Exp $ AM_CXXFLAGS = $(YAZINC) -I$(srcdir)/../include $(XML2_CFLAGS) @@ -13,7 +13,6 @@ libyazcpp_la_SOURCES=yaz-socket-manager.cpp yaz-pdu-assoc.cpp \ bin_PROGRAMS = yaz-proxy noinst_PROGRAMS = yaz-my-server yaz-my-client bin_SCRIPTS = yaz++-config -EXTRA_DIST = config.xml yaz-proxy.sh yaz_my_client_SOURCES=yaz-my-client.cpp diff --git a/src/config.xml b/src/config.xml deleted file mode 100644 index 7d8621c..0000000 --- a/src/config.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - bagel.indexdata.dk - 240 - 180 - - 1000000 - 1000 - - - 2000000 - 50 - 100 - - - - - - - - - 0 - - - localhost:9999 - localhost:9998 - 300 - 180 - - - 50000 - 60 - 10 - - - - - - - - - 2 - - - - - 50 - client-apdu server-apdu - diff --git a/src/yaz-proxy.sh b/src/yaz-proxy.sh deleted file mode 100755 index 757e240..0000000 --- a/src/yaz-proxy.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# -# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl -# -PATH=/usr/local/bin:/bin:/usr/bin -export PATH - -# Proxy CWD is here. Should be writable by it. -DIR=/var/yaz-proxy -# Proxy Path -DAEMON="/usr/local/bin/yaz-proxy" - -# Proxy PIDFILE. Must be writable by it. -PIDFILE="/var/run/yaz-proxy.pid" - -# Log file -LOGFILE=/var/log/yaz-proxy.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 - -# Name, Description (not essential) -NAME=yaz-proxy -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