#!/bin/bash

#定义分发节点号
NODE_IPS=(192.168.2.231 192.168.2.230 192.168.2.229 192.168.2.228 192.168.2.227 192.168.2.226 192.168.2.225 192.168.2.224 192.168.2.223 192.168.2.222)
pwdls=`pwd`
DB_HOME="/DATA1/hzqCB_10Nodes2/BIN/"

for node_ip in ${NODE_IPS[@]}
do
echo ">>> ${node_ip}"
scp $pwdls/$1 root@${node_ip}:$DB_HOME
ssh root@${node_ip} "chmod +x $DB_HOME/*"
ssh root@${node_ip} "mv $DB_HOME/$1 $DB_HOME/$1_hzqcb"
done
