Sfoglia il codice sorgente

fix: 追加而不是覆盖日志

xdd 3 settimane fa
parent
commit
c64f537548
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      deploy.sh

+ 1 - 1
deploy.sh

@@ -46,7 +46,7 @@ deploy_jar() {
   scp "$local_jar" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_BASE_DIR/$remote_dir/"
 
   # 在后台启动 JAR 包, 并将输出重定向到 /dev/null
-    ssh "$REMOTE_USER@$REMOTE_HOST" "nohup java -jar -Dfile.encoding=UTF-8 $REMOTE_BASE_DIR/$remote_dir/$app_name.jar > $REMOTE_BASE_DIR/$remote_dir/$app_name.log 2>&1 &"
+  ssh "$REMOTE_USER@$REMOTE_HOST" "nohup java -jar -Dfile.encoding=UTF-8 $REMOTE_BASE_DIR/$remote_dir/$app_name.jar >> $REMOTE_BASE_DIR/$remote_dir/$app_name.log 2>&1 &"
 
   echo "Deployed $app_name to $REMOTE_HOST:$REMOTE_BASE_DIR/$remote_dir"
 }