#!/bin/bash
project=$1
config_server=$2
project_path=$3

node4_path=`cat $config_server/node_4_path.sh`
node7_path=`cat $config_server/node_7_path.sh`

desc=`node $config_server/get_project_config.js  -name $project -attr desc`
stop_command_=`node $config_server/get_project_config.js  -name $project -attr command2`
stop_command=${stop_command_//\^/ }
sh $config_server/show_info.sh $project 重新启动 $desc $2
cd $project_path/$project
$stop_command
start_command_=`node $config_server/get_project_config.js  -name $project -attr command`
start_command=${start_command_//\^/ }
$start_command
if [ $? -ne 0 ]
then
	echo "Fail to start"
	exit -1
fi