kopia lustrzana https://github.com/jprochazka/adsb-receiver
The airplaneslive.sh script now uses new logging functions.
rodzic
278fb3e895
commit
ca3ba03f6a
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -4,16 +4,16 @@ The following is a history of the changes made to this project.
|
|||
|
||||
## v2.8.5 *(in development)*
|
||||
|
||||
### Installer
|
||||
|
||||
* Added the --version and -v arguments in order to display the current project version.
|
||||
* Added logging functions which in the future will offer a way to log output to files.
|
||||
* Added variables which can be modified to adjust text colors used by the Bash scripts.
|
||||
* The PiAware installation script now supports Ubuntu Noble Numbat.
|
||||
* The installation of PiAware is no longer required when choosing to install dump1090-fa.
|
||||
* The dump1090-fa installation script to match current installation dump1090-fa instructions.
|
||||
* The dump1090-fa installation script now mimics the current dump1090-fa installation instructions.
|
||||
* Added logging functions which in the future will offer a way to log output to files.
|
||||
* Added variables which can be modified to adjust text colors used by the bash scripts.
|
||||
* Modified the dump1090-fa installation script so that it utilizes the new logging functions.
|
||||
* Modified the dump978-fa installation script so that it utilizes the new logging functions.
|
||||
* The PiAware installation script now supports Ubuntu Noble Numbat.
|
||||
* Modified the ADS-B Exchange client installation script so it utilizes the new logging functions.
|
||||
* Modified the airplanes.live client installation script so it utilizes the new logging functions.
|
||||
* Added the --version and -v arguments in order to display the current project version.
|
||||
|
||||
## v2.8.4 *(July 13th, 2024)* :rooster:
|
||||
|
||||
|
|
|
@ -29,8 +29,9 @@ fi
|
|||
|
||||
## DOWNLOAD AND EXECUTE THE ADS-B EXCHANGE CLIENT INSTALL SCRIPT
|
||||
|
||||
LogHeading "Executing either the install or upgrade script"
|
||||
LogHeading "Downloading the proper ADS-B Exchange client script"
|
||||
|
||||
LogMessage "Informing the user of how the installation process will work"
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
||||
--title "ADS-B Exchange Feed Setup" \
|
||||
--msgbox "Scripts supplied by ADS-B Exchange will be used in order to install or upgrade this system. Interaction with the script exececuted will be required in order to complete the installation." \
|
||||
|
@ -45,7 +46,7 @@ fi
|
|||
LogMessage "Entering the ADSBExchange build directory"
|
||||
cd $RECEIVER_BUILD_DIRECTORY/adsbexchange
|
||||
|
||||
LogMessage "Determining if the installation or upgrade script should be executed"
|
||||
LogMessage "Determining whether the installation or upgrade script should be used"
|
||||
action_to_perform="install"
|
||||
if [[ -f /lib/systemd/system/adsbexchange-mlat.service && -f /lib/systemd/system/adsbexchange-feed.service ]]; then
|
||||
action_to_perform="upgrade"
|
||||
|
@ -54,10 +55,8 @@ fi
|
|||
LogMessage "Downloading the ADS-B Exchange client ${action_to_perform} script"
|
||||
echo ""
|
||||
if [[ "${action_to_perform}" = "install" ]]; then
|
||||
echo ""
|
||||
wget -O $RECEIVER_BUILD_DIRECTORY/adsbexchange/feed-${action_to_perform}.sh https://www.adsbexchange.com/feed.sh
|
||||
else
|
||||
echo ""
|
||||
wget -O $RECEIVER_BUILD_DIRECTORY/adsbexchange/feed-${action_to_perform}.sh https://www.adsbexchange.com/feed-update.sh
|
||||
fi
|
||||
echo ""
|
||||
|
@ -86,7 +85,7 @@ if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
|||
sudo bash $RECEIVER_BUILD_DIRECTORY/adsbexchange/axstats.sh
|
||||
echo ""
|
||||
else
|
||||
LogMessage "The user opted out of installing the ADS-B Exchange stats package""
|
||||
LogMessage "The user opted out of installing the ADS-B Exchange stats package"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -103,6 +102,8 @@ if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
|||
echo ""
|
||||
sudo bash /usr/local/share/adsbexchange/git/install-or-update-interface.sh
|
||||
echo ""
|
||||
else
|
||||
LogMessage "The user opted out of installing the ADS-B Exchange web interface"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -1,63 +1,54 @@
|
|||
#!/bin/bash
|
||||
|
||||
## INCLUDE EXTERNAL SCRIPTS
|
||||
## PRE INSTALLATION OPERATIONS
|
||||
|
||||
source $RECEIVER_BASH_DIRECTORY/variables.sh
|
||||
source $RECEIVER_BASH_DIRECTORY/functions.sh
|
||||
|
||||
|
||||
## BEGIN SETUP
|
||||
|
||||
clear
|
||||
echo -e "\n\e[91m ${RECEIVER_PROJECT_TITLE}"
|
||||
echo -e ""
|
||||
echo -e "\e[92m Setting up the airplanes.live feeder client..."
|
||||
echo -e ""
|
||||
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
|
||||
echo -e ""
|
||||
|
||||
|
||||
# Confirm component installation.
|
||||
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Airplanes.live Feeder Client Setup" --yesno "The airplanes.live feeder client takes data from a local dump1090 instance and shares this with airplanes.live. for more information please see their website:\n\n https://airplanes.live/how-to-feed/\n\nContinue setup by installing the airplanes.live feeder client?" 13 78 3>&1 1>&2 2>&3; then
|
||||
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
|
||||
echo -e " Setup has been halted at the request of the user."
|
||||
echo -e ""
|
||||
echo -e "\e[93m ------------------------------------------------------------------------------"
|
||||
echo -e "\e[92m Airplanes.live feeder client setup halted.\e[39m"
|
||||
echo -e ""
|
||||
read -p "Press enter to continue..." discard
|
||||
LogProjectName ${RECEIVER_PROJECT_TITLE}
|
||||
LogTitleHeading "Setting up the Airplanes.live client"
|
||||
LogTitleMessage "------------------------------------------------------------------------------"
|
||||
echo ""
|
||||
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
||||
--title "Airplanes.live Feeder Client Setup" \
|
||||
--yesno "The airplanes.live feeder client takes data from a local dump1090 instance and shares this with airplanes.live. for more information please see their website:\n\n https://airplanes.live/how-to-feed/\n\nContinue setup by installing the airplanes.live feeder client?" \
|
||||
13 78; then
|
||||
LogAlertHeading "INSTALLATION HALTED"
|
||||
LogAlertMessage "Setup has been halted at the request of the user"
|
||||
echo ""
|
||||
LogTitleMessage "------------------------------------------------------------------------------"
|
||||
LogTitleHeading "Airplanes.live client setup halted"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
## START FEEDER INSTALLATION
|
||||
## DOWNLOAD AND EXECUTE THE AIRPLANES.LIVE CLIENT INSTALL SCRIPT
|
||||
|
||||
echo -e ""
|
||||
echo -e "\e[95m Begining the airplanes.live feeder client installation process...\e[97m"
|
||||
echo -e ""
|
||||
LogHeading "Begining the airplanes.live feeder client installation process"
|
||||
|
||||
# Create the component build directory if it does not exist
|
||||
if [[ ! -d $RECEIVER_BUILD_DIRECTORY/airplaneslive ]]; then
|
||||
echo -e "\e[94m Creating the airplanes.live feeder client build directory...\e[97m"
|
||||
LogMessage "Informing the user of how the installation process will work"
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
||||
--title "ADS-B Exchange Feed Setup" \
|
||||
--msgbox "Scripts supplied by airplanes.live will be used in order to install or upgrade this system. Interaction with the script exececuted will be required in order to complete the installation." \
|
||||
10 78
|
||||
|
||||
if [[ ! -d $RECEIVER_BUILD_DIRECTORY/adsbexchange ]]; then
|
||||
LogMessage "Creating the airplanes.live build directory"
|
||||
echo ""
|
||||
mkdir -vp $RECEIVER_BUILD_DIRECTORY/airplaneslive
|
||||
echo ""
|
||||
fi
|
||||
LogMessage "Entering the airplanes.live build directory"
|
||||
cd $RECEIVER_BUILD_DIRECTORY/airplaneslive
|
||||
|
||||
# Change to the component build directory
|
||||
echo -e "\e[94m Entering the airplanes.live feeder client build directory...\e[97m"
|
||||
cd $RECEIVER_BUILD_DIRECTORY/airplaneslive 2>&1
|
||||
LogMessage "Downloading the airplanes.live client installation script"
|
||||
echo ""
|
||||
wget -O $RECEIVER_BUILD_DIRECTORY/airplaneslive/install.sh https://raw.githubusercontent.com/airplanes-live/feed/main/install.sh
|
||||
echo ""
|
||||
|
||||
# Download the official airplanes.live feeder installation script
|
||||
echo -e "\e[95m Beginning the airplanes.live feeder client installation...\e[97m"
|
||||
echo -e ""
|
||||
|
||||
echo -e "\e[94m Downloading the airplanes.live feeder client installation script...\e[97m"
|
||||
echo ""
|
||||
wget -v https://raw.githubusercontent.com/airplanes-live/feed/main/install.sh
|
||||
|
||||
echo -e "\e[94m Executing the airplanes.live feeder client installation script...\e[97m"
|
||||
LogMessage "Executing the airplanes.live client installation script"
|
||||
echo ""
|
||||
sudo bash $RECEIVER_BUILD_DIRECTORY/airplaneslive/install.sh
|
||||
echo ""
|
||||
|
@ -65,49 +56,56 @@ echo ""
|
|||
|
||||
## CHECK THE STATUS OF THE FEEDER
|
||||
|
||||
echo -e "\e[95m Checking if the reciver is now feeding airplanes.live...\e[97m"
|
||||
echo -e ""
|
||||
"\e[95m Checking for connections on ports 30004 and 31090 to IP address 78.46.234.18...\e[97m"
|
||||
LogHeading "Checking if the reciver is now feeding airplanes.live"
|
||||
|
||||
LogMessage "Checking for connections on ports 30004 and 31090 to IP address 78.46.234.18"
|
||||
netstat_output = `netstat -t -n | grep -E '30004|31090'`
|
||||
if [[ $netstat_output == *"78.46.234.18:30004 ESTABLISHED"* && $netstat_output == *"78.46.234.18:31090 ESTABLISHED"* ]]
|
||||
"\e[95m The receiver appears to be feeding airplanes.live...\e[97m"
|
||||
LogMessage "This device appears to be connected to airplanes.live"
|
||||
else
|
||||
"\e[91m The receiver does not appear to be feeding airplanes.live at this time...\e[97m"
|
||||
"\e[95m Please reboot your device and run the command ''netstat -t -n | grep -E '30004|31090' to see if a connection has been astablished.\e[97m"
|
||||
"\e[95m If the issue presists supply the last 20 lines given by the following command on the airplanes.live discord.\e[97m"
|
||||
"\e[95m 'sudo journalctl -u airplanes-feed --no-pager'\e[97m"
|
||||
"\e[95m 'sudo journalctl -u airplanes-mlat --no-pager'\e[97m"
|
||||
LogAlertMessage "The receiver does not appear to be feeding airplanes.live at this time...\e[97m"
|
||||
LogAlertMessage "Please reboot your device and run the command 'netstat -t -n | grep -E '30004|31090' to see if a connection has been astablished."
|
||||
LogAlertMessage "If the issue presists supply the last 20 lines given by the following command on the airplanes.live discord."
|
||||
LogAlertMessage " 'sudo journalctl -u airplanes-feed --no-pager'"
|
||||
LogAlertMessage " 'sudo journalctl -u airplanes-mlat --no-pager'"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
|
||||
## INSTALL THE AIRPLANES.LIVE WEB INTERFACE
|
||||
|
||||
if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Airplanes.live Web Interface Setup" --yesno "Airplanes.live offers the option to install an additional web interface.\n\nWould you like to install the web interface now?" 12 78; then
|
||||
echo -e "\e[95m Begining the airplanes.live web interface installation...\e[97m"
|
||||
LogHeading "Starting the airplanes.live web interface setup process"
|
||||
|
||||
LogMessage "Asking if the user wishes to install the ADS-B Exchange web interface"
|
||||
if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
||||
--title "Airplanes.live Web Interface Setup" \
|
||||
--yesno "Airplanes.live offers the option to install an additional web interface.\n\nWould you like to install the web interface now?" \
|
||||
12 78; then
|
||||
echo ""
|
||||
echo -e "\e[94m Executing the airplanes.live web interface installation script...\e[97m"
|
||||
LogMessage "Executing the airplanes.live web interface installation script"
|
||||
echo ""
|
||||
sudo bash sudo bash /usr/local/share/airplanes/git/install-or-update-interface.sh
|
||||
echo ""
|
||||
else
|
||||
LogMessage "The user opted out of installing the airplanes.live web interface"
|
||||
fi
|
||||
|
||||
|
||||
## POST INSTALLATION INFORMATION
|
||||
## POST INSTALLATION OPERATIONS
|
||||
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Airplanes.live Feeder Setup Complete" --msgbox "Setup of the airplanes.live feeder client is now complete. You can check your feeder status at https://airplanes.live/myfeed." 12 78
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
|
||||
--title "Airplanes.live Client Setup Complete" \
|
||||
--msgbox "Setup of the airplanes.live client is now complete. You can check your feeder status at https://airplanes.live/myfeed." \
|
||||
12 78
|
||||
|
||||
|
||||
## SETUP COMPLETE
|
||||
|
||||
# Return to the project root directory
|
||||
echo -e "\e[94m Returning to ${RECEIVER_PROJECT_TITLE} root directory...\e[97m"
|
||||
cd $RECEIVER_ROOT_DIRECTORY 2>&1
|
||||
LogMessage "Returning to ${RECEIVER_PROJECT_TITLE} root directory"
|
||||
cd $RECEIVER_ROOT_DIRECTORY
|
||||
|
||||
echo -e ""
|
||||
echo -e "\e[93m ------------------------------------------------------------------------------"
|
||||
echo -e "\e[92m Airplanes.live feeder client setup is complete.\e[39m"
|
||||
echo -e ""
|
||||
echo ""
|
||||
LogTitleMessage "------------------------------------------------------------------------------"
|
||||
LogTitleHeading "Airplanes.live client setup is complete"
|
||||
echo ""
|
||||
read -p "Press enter to continue..." discard
|
||||
|
||||
exit 0
|
||||
|
|
Ładowanie…
Reference in New Issue