7 Commits

Author SHA1 Message Date
taylanbakircioglu 2d5c863735 fix: replace static protected paths with dynamic safety in uninstall
Instead of a hardcoded PROTECTED_PATHS list (varies per environment):
- safe_rm() blocks any path not containing "haproxy-agent"
- Process killer verifies ps output contains "haproxy-agent"
- Pre/post HAProxy integrity check via md5 hash comparison of config
  and service status diff (was running -> still running?)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:45:29 +03:00
taylanbakircioglu 8351a6439b fix: add HAProxy safety guards to uninstall scripts
- PROTECTED_PATHS array prevents accidental removal of haproxy.cfg,
  haproxy binary, haproxy.service, haproxy logs
- safe_rm() blocks any path not containing "haproxy-agent"
- Process killer verifies command line contains "haproxy-agent" and
  skips HAProxy master PID
- Binary removal validates filename is exactly "haproxy-agent"
- Pre-flight safety check reports HAProxy status before starting
- Post-uninstall HAProxy integrity check confirms nothing was touched

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:45:29 +03:00
taylanbakircioglu 08c500855e fix: rewrite uninstall scripts - simple and reliable
Replaced overcomplicated 380-line scripts with clean ~125-line versions.
Steps: stop service, kill processes (excluding self), remove binary,
remove config/logs/temps, verify. No emojis, no fragile helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:45:29 +03:00
taylanbakircioglu b7dde62972 fix: prevent uninstall script from killing itself via pgrep
pgrep -f "haproxy-agent" was matching the uninstall script's own
process (uninstall-haproxy-agent-linux.sh contains "haproxy-agent"),
causing the script to terminate itself at step 1/7 before reaching
file cleanup. Now filters out $$ (own PID) and $PPID from kill lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:45:29 +03:00
taylanbakircioglu 5cec6cf85a fix: remove emojis from all agent scripts and fix install/uninstall bugs
- Remove all emoji characters from install scripts (linux, macos)
- Rewrite uninstall scripts: remove set -e, fix safe_remove to always
  return 0, replace ((var++)) with $((var + 1)), fix local keyword
  usage, add comprehensive cleanup including config.json
- Fix install script QUIET_MODE/DAEMON_MODE detection to correctly
  handle interactive runs when old config.json exists

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:45:29 +03:00
taylanbakircioglu 0c1d68eb01 feat: add uninstall script UI with modern design
- Add new API endpoint to serve uninstall scripts by platform
- Display uninstall script alongside install script in setup wizard
- Add dedicated delete agent modal with 2-step workflow
- Modern UI with gradient banners, platform icons, and info cards
- Enhanced uninstall scripts to clean all agent temp/backup files
- HAProxy service and config remain untouched during uninstall
2026-01-26 15:25:15 +03:00
taylanbakircioglu 6aae0f4309 Initial commit 2025-10-27 12:14:03 +03:00