From 6a8c8d430b80f6c28761cf6f3f280219ef13eb5f Mon Sep 17 00:00:00 2001 From: Smittix Date: Wed, 18 Feb 2026 17:36:25 +0000 Subject: [PATCH] fix: Remove stale dump1090 symlink before install check If dump1090-mutability was installed by a previous run and later removed (e.g. by apt removing it as a reverse dep), the symlink at /usr/local/sbin/dump1090 is left pointing at a non-existent target. cmd_exists finds the broken symlink and treats dump1090 as installed, so the real install is skipped and running dump1090 gives "No such file or directory". Before the install check, resolve the command path and delete it if it exists in PATH but is not executable (broken symlink). Co-Authored-By: Claude Sonnet 4.6 --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.sh b/setup.sh index ab3f959..60d0fa3 100755 --- a/setup.sh +++ b/setup.sh @@ -1552,6 +1552,15 @@ install_debian_packages() { $SUDO apt-get install -y python3-bleak >/dev/null 2>&1 || true progress "Installing dump1090" + # Remove any stale symlink left from a previous run where dump1090-mutability + # was later uninstalled — cmd_exists finds the broken symlink and skips the + # real install, leaving dump1090 seemingly present but non-functional. + local dump1090_path + dump1090_path="$(command -v dump1090 2>/dev/null || true)" + if [[ -n "$dump1090_path" ]] && [[ ! -x "$dump1090_path" ]]; then + info "Removing broken dump1090 symlink: $dump1090_path" + $SUDO rm -f "$dump1090_path" + fi if ! cmd_exists dump1090 && ! cmd_exists dump1090-mutability; then apt_try_install_any dump1090-fa dump1090-mutability dump1090 || true fi