mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
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 <noreply@anthropic.com>
This commit is contained in:
9
setup.sh
9
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
|
||||
|
||||
Reference in New Issue
Block a user