Let's kill started up jp-importer.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 10 Nov 2005 09:36:50 +0000 (09:36 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Thu, 10 Nov 2005 09:36:50 +0000 (09:36 +0000)
org.glite.jp.client/examples/glite-jp-importer.sh

index 3cd9788..02c79ee 100644 (file)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 
 #
 # example script for purging LB and importing the dumps to JP
@@ -35,6 +35,8 @@ LOGDIR=/tmp/log
 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 &
+JP_PID=$!
+trap "kill $JP_PID; exit 0" SIGINT
 
 while [ 1 ]; do
   $PREFIX/sbin/glite-lb-purge -o 1 -l -m $BKSERVER