Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
eb4ca9cb
Commit
eb4ca9cb
authored
Feb 28, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改NODE的启动方式
parent
5d1bf8fd
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
78 deletions
+92
-78
5_restart_by_name.sh
qa_shell_script/5_restart_by_name.sh
+17
-13
5_restart_by_type.sh
qa_shell_script/5_restart_by_type.sh
+17
-12
6_start_by_name.sh
qa_shell_script/6_start_by_name.sh
+17
-13
get_project_config.js
qa_shell_script/config_server/get_project_config.js
+41
-40
No files found.
qa_shell_script/5_restart_by_name.sh
View file @
eb4ca9cb
...
@@ -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
()
...
...
qa_shell_script/5_restart_by_type.sh
View file @
eb4ca9cb
...
@@ -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
}
}
...
...
qa_shell_script/6_start_by_name.sh
View file @
eb4ca9cb
...
@@ -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
()
...
...
qa_shell_script/config_server/get_project_config.js
View file @
eb4ca9cb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment