parent
302c7c4654
commit
bf50404b3e
2 changed files with 19 additions and 6 deletions
@ -1,11 +1,19 @@ |
||||
#!/bin/bash |
||||
APP_NAME="qry-python-js" |
||||
activate=$1 |
||||
if [ "$activate" == "" ]; then |
||||
activate=dev |
||||
echo "未设置环境变量参数 默认:dev" |
||||
fi |
||||
|
||||
echo "启动环境 $activate" |
||||
|
||||
#source /usr/share/nvm/init-nvm.sh |
||||
nvm use 20 |
||||
if pm2 status | grep -q "$APP_NAME.*online"; then |
||||
echo "Application $APP_NAME is running." |
||||
pm2 restart $APP_NAME |
||||
pm2 restart ecosystem.config.js --env $activate |
||||
else |
||||
echo "Application $APP_NAME is not running." |
||||
pm2 start |
||||
pm2 start ecosystem.config.js --env $activate |
||||
fi |
Loading…
Reference in new issue