#! /bin/sh # fixscript will replace this line with code to load innshellvars # $Id: sendxbatches.in 2674 1999-11-15 06:28:29Z rra $ # By petri@ibr.cs.tu-bs.de with mods by libove@jerry.alf.dec.com # # Script to send xbatches for a site, wrapped around innxbatch # Invocation: sendxbatches ... # ## TODO: - we should check the amount of queued batches for the site, ## to prevent disk overflow due to unreachable sites. if [ $# -lt 3 ] then echo "usage: $0 " exit 1 fi LOCK=${LOCKS}/LOCK.sendxbatches shlock -p $$ -f ${LOCK} if [ $? -ne 0 ] then echo Locked by `cat ${LOCK}` exit 1 fi trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15 site="$1" host="$2" shift; shift ctlinnd -s flush "$site" if [ $? -ne 0 ] then echo "ctlinnd flush $site failed." exit 1 fi sleep 5 $NEWSBIN/innxbatch -D -v "$host" $*