# The dump1090-mutability package appear to be installed.
DUMP1090MUTABILITY_INSTALLED=0
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Dump1090-mutability Installed" --defaultno --yesno "The dump1090-mutability package appears to be installed on your device, however...\n\nThe dump1090-mutability v1.15~dev source code is regularly updated without a change made to the version numbering. To ensure you are running the latest version of dump1090-mutability you may opt to rebuild and reinstall this package.\n\nDownload, build, and reinstall this package?"1665
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Dump1090-fa Upgrade Available" --defaultno --yesno "An updated version of dump1090-fa is available.\n\nWould you like to download, build, then install the new version?"1665
DUMP1090FA_UPGRADE=$?
fi
fi
# If any version of dump1090 is not installed ask which one to install.
DUMP1090OPTION=$(whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Choose Dump1090 Version" --menu "The dump1090-mutability or dump1090-fa package does not appear to be installed on this device. In order to continue setup one of these two packages need to be installed. Please select your prefered dump1090 version from the list below.\n\nPlease note that in order to run dump1090-fa PiAware will need to be installed as well."16652"dump1090-mutability""(Mutability)""dump1090-fa""(FlightAware)" 3>&1 1>&2 2>&3)
case$DUMP1090OPTION in
"dump1090-mutability")
DUMP1090MUTABILITY_INSTALL=0
;;
"dump1090-fa")
DUMP1090FA_INSTALL=0
;;
*)
echo -e "\033[31m"
echo" A compatable dump1090 installation is required in order to continue setup."
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Dump978 Installed" --defaultno --yesno "Dump978 appears to be installed on your device, however...\n\nThe dump978 source code may have been updated since it was built last. To ensure you are running the latest version of dump978 you may opt to rebuild the binaries making up dump978.\n\nDownload and rebuild the dump978 binaries?"1465
DUMP978_REINSTALL=$?
else
# Dump978 does not appear to have been built yet.
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Dump978 Not Installed" --defaultno --yesno "Dump978 is an experimental demodulator/decoder for 978MHz UAT signals. These scripts can setup dump978 for you. However keep in mind a second RTL-SDR device will be required to feed data to it.\n\nDo you wish to install dump978?"1065
DUMP978_INSTALL=$?
fi
## Feeder Selection Menu
# Declare the FEEDERLIST array which will store feeder installation choices for the feeder whiptail menu.
# Display a checklist containing feeders that are not installed if any.
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Feeder Installation Options" --checklist --nocancel --separate-output "The following feeders are available for installation.\nChoose the feeders you wish to install."13654"${FEEDERLIST[@]}" 2>FEEDERCHOICES
else
# Since all available feeders appear to be installed inform the user of the fact.
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "All Feeders Installed" --msgbox "It appears that all the optional feeders available for installation by this script have been installed already."865
fi
## ADS-B Receiver Project Web Portal
# Ask if the web portal should be installed.
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Install The ADS-B Receiver Project Web Portal" --yesno "The ADS-B Receiver Project Web Portal is a lightweight web interface for dump-1090-mutability installations.\n\nCurrent features include the following:\n Unified navigation between all web pages.\n System and dump1090 performance graphs.\n\nWould you like to install the ADS-B Receiver Project web portal on this device?"878
PORTAL_INSTALL=$?
## Setup Confirmation
# Check if anything is to be done before moving on.
whiptail --backtitle "$ADSB_PROJECTTITLE" --title "Nothing to be done" --msgbox "Nothing has been selected to be installed so the script will exit now."1065