Stop uninstall from killing unrelated PM2 processes on the server.

Only stop and delete crypto_monitor app names (plus legacy aliases) instead of pm2 stop/delete all.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-12 12:56:08 +08:00
parent 337a6bc54f
commit 8e492987ec
3 changed files with 60 additions and 11 deletions
+3 -8
View File
@@ -41,14 +41,9 @@ main_uninstall() {
echo "removed_dir=${removed_dir}"
} >"${backup_dir}/uninstall.manifest"
step "停止并清空 PM2"
if command -v pm2 >/dev/null 2>&1; then
pm2 stop all 2>/dev/null || true
pm2 delete all 2>/dev/null || true
pm2 save 2>/dev/null || true
else
log "未安装 pm2,跳过"
fi
step "停止并移除本项目 PM2 进程(不影响其它 PM2)"
pm2_stop_project_apps
pm2_delete_project_apps
remove_backup_cron_all