#!/bin/bash
#
# ::copy::
# ::maintainer::
#
CMD=`basename $0`
verbose=

. /etc/default/kusa-netservices	|| exit $?

usage()
{
	echo "usage: $CMD [-v] sys[,sys2,sys3...] [kusa parms]" >&2
	exit 1
}


# (MAIN)

R=`tput rev 2>/dev/null`
N=`tput sgr0 2>/dev/null`

[ X"$1" = X-v ] && {
	verbose="-v"
	shift
}
[ $# = 0 ] && usage

systems="$1" ; shift

for sys in `echo $systems | tr ',' ' '`
do
	echo -e "\n$R $sys $N\n"
	echo "start $verbose $*" | nc $sys $KUSA_NETSERVICE_KUSACLI
done

exit 0
