#!/bin/bash
#project_path=`cat $config_server/get_env_ip.sh`
pwd_path_0="/home/qa-deploy-utils"
project_name=$1
target_ip=$2
for ip_last_num in $target_ip
	do
			IP_host=`sh $pwd_path_0/get-ip.sh $ip_last_num`
			expect -c "
			set timeout 10
			spawn ssh root@${IP_host}
			expect \"]#\"
			send \"sh /home/qa-deploy-utils/qa_shell_script/6_start_by_name.sh $project_name\r\"
			set timeout -1
			expect \"]#\"
			send \"exit\r\"
			expect eof;"
	done
