Commit eb4ca9cb authored by tywldx's avatar tywldx

修改NODE的启动方式

parent 5d1bf8fd
...@@ -67,21 +67,25 @@ function restartNodeProject() ...@@ -67,21 +67,25 @@ function restartNodeProject()
{ {
project=$1 project=$1
desc=`node $config_server/get_project_config.js -name $project -attr desc` 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 sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project cd $project_path/$project
$stop_command
forever stop $project # forever stop $project
forever stop $project-www # forever stop $project-www
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print` # pm2 stop $project
echo "------setup_path_temp:$setup_path_temp" start_command=`node $config_server/get_project_config.js -name $project -attr command`
$start_command
echo `forever start -a -s --uid $project ${setup_path_temp}` # setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
# echo "------setup_path_temp:$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 `forever start -a -s --uid $project ${setup_path_temp}`
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}` # setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
fi # 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() function restartPythonProject()
......
...@@ -67,21 +67,26 @@ function restartNodeProject() ...@@ -67,21 +67,26 @@ function restartNodeProject()
for project in ${projects[@]} for project in ${projects[@]}
do do
desc=`node $config_server/get_project_config.js -name $project -attr desc` 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 sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project cd $project_path/$project
forever stop $project $stop_command
forever stop $project-www # forever stop $project
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print` # forever stop $project-www
echo "------setup_path_temp:$setup_path_temp" # pm2 stop $project
start_command=`node $config_server/get_project_config.js -name $project -attr command`
echo `forever start -a -s --uid $project ${setup_path_temp}` $start_command
# setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print` # echo "------setup_path_temp:$setup_path_temp"
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 ${setup_path_temp}`
echo `forever start -a -s --uid $project-www ${setup_path_temp_for_appbackent}` #
fi # 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 done
} }
......
...@@ -46,21 +46,25 @@ function restartNodeProject() ...@@ -46,21 +46,25 @@ function restartNodeProject()
{ {
project=$1 project=$1
desc=`node $config_server/get_project_config.js -name $project -attr desc` 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 sh $config_server/show_info.sh $project 重新启动 $desc
cd $project_path/$project cd $project_path/$project
$stop_command
forever stop $project # forever stop $project
forever stop $project-www # forever stop $project-www
setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print` # pm2 stop $project
echo "------setup_path_temp:$setup_path_temp" start_command=`node $config_server/get_project_config.js -name $project -attr command`
$start_command
echo `forever start -a -s --uid $project ${setup_path_temp}` # setup_path_temp=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "app.js" -print`
# echo "------setup_path_temp:$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 `forever start -a -s --uid $project ${setup_path_temp}`
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}` # setup_path_temp_for_appbackent=`find ./ -maxdepth 2 -path "./node_modules" -prune -o -type f -name "www" -print`
fi # 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() 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