From 62bedaf52c8d45dc178bfcd5fdb3a830f8193062 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 8 Nov 2005 17:41:08 +0000 Subject: [PATCH] Fix the script (~ isn't expanded). --- org.glite.jp.client/Makefile | 2 +- org.glite.jp.client/examples/glite-jp-importer.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/org.glite.jp.client/Makefile b/org.glite.jp.client/Makefile index 61c05d1..3577e87 100644 --- a/org.glite.jp.client/Makefile +++ b/org.glite.jp.client/Makefile @@ -146,7 +146,7 @@ install: ${INSTALL} -m 755 ${daemon} ${PREFIX}/bin ${INSTALL} -m 644 ${LIB} ${PREFIX}/lib ${INSTALL} -m 644 jpps_upload_files ${PREFIX}/examples/glite-jp-primary-upload_files - cd ${top_srcdir}/examples && ${INSTALL} -m 644 glite-jp-importer.sh ${PREFIX}/examples/ + cd ${top_srcdir}/examples && ${INSTALL} -m 755 glite-jp-importer.sh ${PREFIX}/examples/ cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${HDRS} ${PREFIX}/${STAGETO} if [ x${DOSTAGE} = xyes ]; then \ cd ${top_srcdir}/interface && ${INSTALL} -m 644 ${STAGE_HDRS} ${PREFIX}/${STAGETO} ; \ diff --git a/org.glite.jp.client/examples/glite-jp-importer.sh b/org.glite.jp.client/examples/glite-jp-importer.sh index f0ea65f..0faf1da 100644 --- a/org.glite.jp.client/examples/glite-jp-importer.sh +++ b/org.glite.jp.client/examples/glite-jp-importer.sh @@ -13,7 +13,7 @@ BKSERVER_DUMPDIR=/tmp/dump # LB maildir for job registration (-J argument) BKSERVER_JOBREG_MAILDIR=/tmp/lb_server_jpreg -CERT_ARGS="-c ~/.cert/hostcert.pem -k ~/.cert/hostkey.pem" +CERT_ARGS="-c /home/valtri/.cert/hostcert.pem -k /home/valtri/.cert/hostkey.pem" LB_DUMPDIR=/tmp/lb_server_dump BKSERVER_DUMPDIR_OLD=/tmp/dump.old LB_EXPORTDIR=/tmp/lb_export @@ -27,6 +27,8 @@ LOGDIR=/tmp/log [ -d $LB_EXPORTDIR ] || mkdir -p $LB_EXPORTDIR [ -d $LOGDIR ] || mkdir -p $LOGDIR +echo "Using cert args $CERT_ARGS" + $PREFIX/bin/glite-jp-importer -r $BKSERVER_JOBREG_MAILDIR -d $LB_DUMPDIR $CERT_ARGS -g -p $JBSERVER > $LOGDIR/jp-importer.log 2>&1 & while [ 1 ]; do @@ -34,8 +36,12 @@ while [ 1 ]; do for file in $BKSERVER_DUMPDIR/*; do rm -f $LB_EXPORTDIR/* - $PREFIX/sbin/glite-lb-lb_dump_exporter -d $file -s $LB_EXPORTDIR -m $LB_DUMPDIR - mv $file $BKSERVER_DUMPDIR_OLD + if [ -s $file ]; then + $PREFIX/sbin/glite-lb-lb_dump_exporter -d $file -s $LB_EXPORTDIR -m $LB_DUMPDIR + mv $file $BKSERVER_DUMPDIR_OLD + else + rm $file + fi done sleep 30 -- 1.8.2.3