Couple minor fixes to scripting added for ADSBHub support.

pull/472/head
Joe Prochazka 2018-06-27 11:45:31 -04:00
rodzic 981af38c95
commit 7626308279
2 zmienionych plików z 6 dodań i 6 usunięć

6
bash/feeders/adsbhub.sh 100644 → 100755
Wyświetl plik

@ -64,7 +64,7 @@ echo -e ""
# Confirm component installation.
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
# Interactive install.
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "ADSBHub client Setup" --yesno "There are many Web sites tracking aircraft and all of them rely on data shared by ADS-B fans. However, the access to aggregated ADS-B worldwide data is limited. The main goal of ADSBHub is to become a ADS-B data sharing centre and valuable data source for all enthusiasts and professionals interested in development of ADS-B related software. For more information please see their website:\n\n http://www.adsbhub.org/howtofeed.php\n\nContinue setup by installing the ADSBHub client?" 13 78 3>&1 1>&2 2>&3)
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "ADSBHub client Setup" --yesno "There are many Web sites tracking aircraft and all of them rely on data shared by ADS-B fans. However, the access to aggregated ADS-B worldwide data is limited. The main goal of ADSBHub is to become a ADS-B data sharing centre and valuable data source for all enthusiasts and professionals interested in development of ADS-B related software. For more information please see their website:\n\n http://www.adsbhub.org/howtofeed.php\n\nContinue setup by installing the ADSBHub client?" 16 78 3>&1 1>&2 2>&3)
if [[ ${CONTINUE_SETUP} -eq 1 ]] ; then
# Setup has been halted by the user.
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
@ -160,9 +160,9 @@ echo ""
# Kill any currently running instances of the adsbexchange-socat_maint.sh script.
echo -e "\e[94m Checking for any running adsbexchange-socat_maint.sh processes...\e[97m"
if [[ $(ps -aux | grep '[a]dsbhub.sh' | awk '{print $2}') ]]; then
if [[ $(ps -aux | grep '[a]dsbhub/adsbhub.sh' | awk '{print $2}') ]]; then
echo -e "\e[94m Killing the current adsbhub.sh process...\e[97m"
sudo kill -9 $(ps -aux | grep '[a]dsbhub.sh' | awk '{print $2}') &> /dev/null
sudo kill -9 $(ps -aux | grep '[a]dsbhub/adsbhub.sh' | awk '{print $2}') &> /dev/null
fi
echo -e "\e[94m Executing the ADSBHub client script...\e[97m"

Wyświetl plik

@ -474,12 +474,12 @@ else
fi
fi
# Check if the ADSBHuub client script has been set up.
# Check if the ADSBHub client script has been set up.
if ! grep -q "${BUILDDIR}/adsbexchange/adsbexchange-maint.sh &" /etc/rc.local; then
# The ADSBHub client script does not appear to be executed on start up.
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
FEEDER_LIST=("${FEEDERLIST[@]}" 'ADSBHub Client Script' '' OFF)
FEEDER_LIST=("${FEEDER_LIST[@]}" 'ADSBHub Client Script' '' OFF)
else
# Check the installation configuration file to see if the ADSBHub client is to be installed.
if [[ -z "${ADSBHUB_INSTALL}" ]] && [[ "${ADSBHUB_INSTALL}" = "true" ]] ; then
@ -614,7 +614,7 @@ fi
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
if [[ -n "${FEEDER_LIST}" ]] ; then
# Display a checklist containing feeders that are not installed if any.
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Feeder Installation Options" --checklist --nocancel --separate-output "The following feeders are available for installation.\nChoose the feeders you wish to install." 13 65 5 "${FEEDER_LIST[@]}" 2>${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Feeder Installation Options" --checklist --nocancel --separate-output "The following feeders are available for installation.\nChoose the feeders you wish to install." 13 65 6 "${FEEDER_LIST[@]}" 2>${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
else
# Since all available feeders appear to be installed inform the user of the fact.
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "All Feeders Installed" --msgbox "It appears that all the optional feeders available for installation by this script have been installed already." 8 65