Commit eb4ca9cb authored by tywldx's avatar tywldx

修改NODE的启动方式

parent 5d1bf8fd
......@@ -67,21 +67,25 @@ function restartNodeProject()
{
project=$1
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`
sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project
forever stop $project
forever stop $project-www
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
echo "------setup_path_temp:$setup_path_temp"
echo `forever start -a -s --uid $project ${setup_path_temp}`
setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
if [ -n "$setup_path_temp_for_appbackent" ];then
echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
fi
$stop_command
# forever stop $project
# forever stop $project-www
# pm2 stop $project
start_command=`node $config_server/get_project_config.js -name $project -attr command`
$start_command
# setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
# echo "------setup_path_temp:$setup_path_temp"
#
# echo `forever start -a -s --uid $project ${setup_path_temp}`
#
# setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
# if [ -n "$setup_path_temp_for_appbackent" ];then
# echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
# echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
# fi
}
function restartPythonProject()
......
......@@ -67,21 +67,26 @@ function restartNodeProject()
for project in ${projects[@]}
do
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`
sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project
forever stop $project
forever stop $project-www
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
echo "------setup_path_temp:$setup_path_temp"
echo `forever start -a -s --uid $project ${setup_path_temp}`
setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
if [ -n "$setup_path_temp_for_appbackent" ];then
echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
fi
$stop_command
# forever stop $project
# forever stop $project-www
# pm2 stop $project
start_command=`node $config_server/get_project_config.js -name $project -attr command`
$start_command
# setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
# echo "------setup_path_temp:$setup_path_temp"
#
# echo `forever start -a -s --uid $project ${setup_path_temp}`
#
# setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
# if [ -n "$setup_path_temp_for_appbackent" ];then
# echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
# echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
# fi
done
}
......
......@@ -46,21 +46,25 @@ function restartNodeProject()
{
project=$1
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`
sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project
forever stop $project
forever stop $project-www
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
echo "------setup_path_temp:$setup_path_temp"
echo `forever start -a -s --uid $project ${setup_path_temp}`
setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
if [ -n "$setup_path_temp_for_appbackent" ];then
echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
fi
$stop_command
# forever stop $project
# forever stop $project-www
# pm2 stop $project
start_command=`node $config_server/get_project_config.js -name $project -attr command`
$start_command
# setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
# echo "------setup_path_temp:$setup_path_temp"
#
# echo `forever start -a -s --uid $project ${setup_path_temp}`
#
# setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
# if [ -n "$setup_path_temp_for_appbackent" ];then
# echo "-----project:$project while be run command: python $python_project_path --mode=beta --port=$port > /dev/null 2>&1 &"
# echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}`
# fi
}
function restartPythonProject()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment