Merge branch 'dev'

This commit is contained in:
wangliwen 2022-11-08 12:54:58 +08:00
commit 2fdd59e379
2 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,8 @@ public class UpdateUtil {
* @param active 启动程序的配置文件
*/
private void execUpdate(String updateFilePath, String active) {
String cmd = String.format("cd %s && sh update.sh %s %s", pwd, pwd, updateFilePath, "renren-admin", active);
String[] cmd = {"/bin/sh", "-c", String.format("cd %s && sh update.sh %s %s %s %s", pwd, pwd, updateFilePath, "renren-admin", active)};
// String cmd = String.format("cd %s && sh update.sh %s %s", pwd, pwd, updateFilePath, "renren-admin", active);
logger.info("执行指令:{}", cmd);
logger.info(RuntimeUtil.execForStr(cmd));
}

View File

@ -98,7 +98,7 @@ if [ -f "${APP_DIR}/tmp/${APP_NAME}/${APP_NAME}.jar" ]; then
\cp -rf ${APP_DIR}/tmp/${APP_NAME}/${APP_NAME}.jar ${APP_DIR}/
echo "${APP_NAME} 项目更新完成"
else
echo "${APP_NAME} 项目程序不存在"
echo "${APP_NAME} 项目程序不存在 ${APP_DIR}/tmp/${APP_NAME}/${APP_NAME}.jar"
fi
# 移除更新包以及更新的项目