#!/bin/bash
#project_path=`cat $config_server/get_env_ip.sh`
IP=$1
project_name=$2

if [ -n "$IP" ]; then
        expect -c "
	        set timeout 10
	        spawn ssh root@${IP}
	        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;"

	else
		echo "请输入有效的ip地址"
fi
