Skip to content

Commit

Permalink
Couple minor fixes to scripting added for ADSBHub support.
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazka committed Jun 27, 2018
1 parent 981af38 commit 7626308
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bash/feeders/adsbhub.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 https://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 https://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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions bash/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7626308

Please sign in to comment.