#!/bin/bash # cipresinitnodes # where command is start, stop, status or other command accepted by # cipresinit, and nodes is a list of the cluster nodes where the command # is to be run, eg. # # "cipresinitnodes start 0 1 2" - starts the cipres daemon on cipres0.sdsc.edu, # cipres1.sdsc.edu and cipres2.sdsc.edu # if [ $# -lt 2 ]; then echo "usage: $0 " exit fi command="$1" shift for i in $* do hostname=cipres$i.sdsc.edu ssh ${hostname} cipresinit ${command} done