1
This commit is contained in:
parent
3bf26d5dba
commit
6d78a9f23a
16
scripts/publish_pm2_cpp_z_n_i/boundle.sh
Normal file
16
scripts/publish_pm2_cpp_z_n_i/boundle.sh
Normal file
@ -0,0 +1,16 @@
|
||||
source ./common.sh
|
||||
|
||||
cd ${SOURCE_PATH}
|
||||
${PRE_COMPILE_CMD}
|
||||
cmake ${COMPILE_FLAGS}
|
||||
make clean
|
||||
make
|
||||
cp ../bin/${SRC_EXE_NAME} ../../../../bin/${PROJECT_NAME}
|
||||
|
||||
cd ../../../../
|
||||
|
||||
tag_name=`git status |grep '# On branch '|sed 's/# On branch //g'`
|
||||
dir_name=`basename $PWD`
|
||||
package_name=${dir_name}.tar.gz
|
||||
|
||||
tar --exclude=*.git -chzf target/${package_name} bin common.sh reload.sh restart.sh ecosystem.config.js config ${EXT_PKG_FILES}
|
13
scripts/publish_pm2_cpp_z_n_i/ecosystem.config.js
Normal file
13
scripts/publish_pm2_cpp_z_n_i/ecosystem.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
const appName = process.argv[5];
|
||||
const n = process.argv[6];
|
||||
const i = process.argv[7];
|
||||
const execName = process.argv[8];
|
||||
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: appName,
|
||||
args: `-n${n} -i${i}`,
|
||||
script: './' + execName,
|
||||
cwd: 'bin'
|
||||
}]
|
||||
};
|
0
scripts/publish_pm2_cpp_z_n_i/reload.sh
Normal file
0
scripts/publish_pm2_cpp_z_n_i/reload.sh
Normal file
16
scripts/publish_pm2_cpp_z_n_i/restart.sh
Executable file
16
scripts/publish_pm2_cpp_z_n_i/restart.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./common.sh
|
||||
|
||||
ps -ef|grep ${PROJECT_NAME} > bin/ps.log
|
||||
|
||||
instances=(${1//,/ })
|
||||
n=$2
|
||||
|
||||
for i in ${instances[@]}
|
||||
do
|
||||
pm2 delete ecosystem.config.js --only ${PROJECT_NAME}_n${n}_i${i} $n $i ${PROJECT_NAME}
|
||||
pm2 start ecosystem.config.js --only ${PROJECT_NAME}_n${n}_i${i} $n $i ${PROJECT_NAME}
|
||||
done
|
||||
|
||||
echo 'success'
|
Loading…
x
Reference in New Issue
Block a user