Skip to content

Commit

Permalink
Merge pull request #593 from jprochazka/noble
Browse files Browse the repository at this point in the history
v2.8.4 (Temporary Trixie support and cleanup.)
  • Loading branch information
jprochazka authored Jul 24, 2024
2 parents 7c91ec6 + 77bfdc5 commit dec90d9
Show file tree
Hide file tree
Showing 31 changed files with 1,774 additions and 2,157 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
EXTRAS_CHOICES
FEEDER_CHOICES
build/adsbexchange
build/airplaneslive
build/beast-splitter
build/duckdns
build/dump1090*
build/dump978*
build/flightradar24
build/flyitalyadsb
build/piaware_builder
build/planefinder
build/package-archive
logs
18 changes: 13 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

The following is a history of the changes made to this project.

## v2.8.4 *(July 13th, 2024)* :rooster:
## v2.8.5 *(July 23rd, 2024)*

* The PiAware installation script now supports Ubuntu Noble Numbat. *(unofficial fix)*
* The installation of PiAware is no longer required when choosing to install dump1090-fa.
* The dump1090-fa installation script now mimics the current dump1090-fa installation instructions.
* All scripts excluding those related to the portal now utilize the new logging functions.
* Logging to the logs directory is enabled by default but can be disabled with --no-logging or -n.
* Added variables which can be modified to adjust text colors used by the bash scripts.
* Added the --version and -v arguments in order to display the current project version.
* Additional script cleanup done to various files.
* Removed scripting used for image setup.
* Updated the latest Flightradar24 Client version to 1.0.48-0.

### Installers
## v2.8.4 *(July 13th, 2024)* :rooster:

* Added the option to install the airplanes.live feeder client and web interface.

### Portal

* Can now toggle daily data purges as well specify the number of days to keep within the portal.
* Rewrote the aircraft.py script and fixed issues found with newer versions of dump1090.
* Rewrote the maintenance.py script and addressed issue mentioned in an incompatible pull request.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Your local repositories master branch will be updated each time install.sh is ex

The following software can be installed using these scripts.

### The ADS-B Receiver Web Portal
### The ADS-B Portal

Included is the option to install the ADS-B Portal which offers the following features.

Expand Down Expand Up @@ -70,12 +70,12 @@ When setting up the portal you will have to choose between a lite or advanced in

The project currently supports the following Linux distributions.

* Armbian _(Bookworm and Jammy)_
* Debian _(Bookworm and Bullseye)_
* Armbian _(Bookworm, Jammy and Noble)_
* Debian _(Bookworm, Bullseye and Trixie)_
* DietPi _(Bookworm aand Bullseye)_
* Rasbperry PI OS _(Bookworm and Bullseye)_
* Ubuntu _(Jammy Jellyfish and Focal Fossa)_
* Ubuntu _(Jammy Jellyfish, Focal Fossa and Noble Numbat)_

_Support is available via this repository through the use of the issue tracker or discussions._

[Support for Ubuntu Noble Numbat is on hold due to incompatibilities with PiAware's MLAT client.](https://github.com/jprochazka/adsb-receiver/issues/575)
_At this time support for PiAware on distributions based on Debian Trixie and Ubuntu Noble Numbat employ an unofficial fix._
257 changes: 139 additions & 118 deletions bash/decoders/dump1090-fa.sh

Large diffs are not rendered by default.

268 changes: 160 additions & 108 deletions bash/decoders/dump978-fa.sh

Large diffs are not rendered by default.

196 changes: 120 additions & 76 deletions bash/extras/beastsplitter.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
#!/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 beast-splitter..."
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
echo -e ""
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Beast-Splitter Setup" --yesno "beast-splitter is a helper utility for the Mode-S Beast.\n\nThe Beast provides a single data stream over a (USB) serial port. If you have more than one thing that wants to read that data stream, you need something to redistribute the data. This is what beast-splitter does.\n\n https://github.com/flightaware/beast-splitter\n\nContinue beast-splitter setup?" 15 78; then
log_project_title
log_title_heading "Setting up beast-splitter"
log_title_message "------------------------------------------------------------------------------"
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Beast-Splitter Setup" \
--yesno "beast-splitter is a helper utility for the Mode-S Beast.\n\nThe Beast provides a single data stream over a (USB) serial port. If you have more than one thing that wants to read that data stream, you need something to redistribute the data. This is what beast-splitter does.\n\n https://github.com/flightaware/beast-splitter\n\nContinue beast-splitter setup?" \
15 78; then
echo ""
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
echo -e " Setup has been halted at the request of the user."
echo -e ""
Expand All @@ -26,111 +25,156 @@ if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Beast-Splitter Se
fi


## GATHER CONFIGURATION OPTIONS
## GATHER REQUIRED INFORMATION FROM THE USER

if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Enable Beast Splitter" --defaultno --yesno "By default Beast Splitter is disabled. Would you like to enable Beast Splitter now?" 8 65; then
log_heading "Gather information required to configure beast-splitter"

log_message "Asking user if beast-splitter should be enabled"
if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Enable Beast Splitter" \
--defaultno \
--yesno "By default Beast Splitter is disabled. Would you like to enable Beast Splitter now?" 8 65; then
enable_beastsplitter="true"
else
enable_beastsplitter="false"
fi
input_options=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Input Options for Beast Splitter" --nocancel --inputbox "Enter the option telling Beast Splitter where to read data from. You should provide one of the following either --net or --serial.\n\nExamples:\n--serial /dev/beast\n--net remotehost:remoteport" 8 78 3>&1 1>&2 2>&3)
output_options=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Output Options for Beast Splitter" --nocancel --inputbox "Enter the option to tell Beast Splitter where to send output data. You can do so by establishing an outgoing connection or accepting inbound connections.\\Examples:\n--connect remotehost:remoteport\n --listen remotehost:remoteport" 8 78 3>&1 1>&2 2>&3)

log_message "Asking user for the beast-splitter input option"
input_options=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Input Options for Beast Splitter" \
--inputbox "Enter the option telling Beast Splitter where to read data from. You should provide one of the following either --net or --serial.\n\nExamples:\n--serial /dev/beast\n--net remotehost:remoteport" \
8 78 3>&1 1>&2 2>&3)
if [[ $input_options == 0 ]]; then
log_alert_heading "INSTALLATION HALTED"
log_alert_message "Setup has been halted due to lack of required information"
echo ""
log_title_message "------------------------------------------------------------------------------"
log_title_heading "beast-splitter setup halted"
exit 1
fi

log_message "Asking user for the beast-splitter output option"
output_options=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Output Options for Beast Splitter" \
--nocancel --inputbox "Enter the option to tell Beast Splitter where to send output data. You can do so by establishing an outgoing connection or accepting inbound connections.\\Examples:\n--connect remotehost:remoteport\n --listen remotehost:remoteport" \
8 78 3>&1 1>&2 2>&3)
if [[ $output_options == 0 ]]; then
log_alert_heading "INSTALLATION HALTED"
log_alert_message "Setup has been halted due to lack of required information"
echo ""
log_title_message "------------------------------------------------------------------------------"
log_title_heading "beast-splitter setup halted"
exit 1
fi



## CHECK FOR PREREQUISITE PACKAGES

echo -e "\e[95m Checking that the required packages are installed...\e[97m"
echo -e ""
CheckPackage build-essential
CheckPackage debhelper
CheckPackage libboost-system-dev
CheckPackage libboost-program-options-dev
CheckPackage libboost-regex-dev
echo ""
log_heading "Installing packages needed to fulfill beast-splitter dependencies"

check_package build-essential
check_package debhelper
check_package libboost-system-dev
check_package libboost-program-options-dev
check_package libboost-regex-dev


## DOWNLOAD SOURCE
## CLONE OR PULL THE FLIGHTAWARE DUMP978 DECODER SOURCE

echo -e "\e[95m Downloading the beast-splitter repository from GitHub...\e[97m"
echo -e ""
log_heading "Preparing the FlightAware Dump978 Git repository"

echo -e "\e[94m Checking if the Git repository has already been cloned...\e[97m"
if [[ -d $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter && -d $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter/.git ]]; then
# A directory with a git repository containing the source code already exists
echo -e "\e[94m Entering the local beast-splitter git repository directory...\e[97m"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter 2>&1
echo -e "\e[94m Updating the local beast-splitter git repository...\e[97m"
echo -e ""
git pull 2>&1
log_message "Entering the beast-splitter git repository directory"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter
log_message "Pulling the beast-splitter git repository"
echo ""
git pull 2>&1 | tee -a $RECEIVER_LOG_FILE
else
# A directory containing the source code does not exist in the build directory
echo -e "\e[94m Creating the beast-splitter build directory...\e[97m"
log_message "Creating the beast-splitter build directory"
echo ""
mkdir -vp $RECEIVER_BUILD_DIRECTORY/beast-splitter 2>&1
mkdir -v $RECEIVER_BUILD_DIRECTORY/beast-splitter 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""
echo -e "\e[94m Entering the beast-splitter build directory...\e[97m"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter 2>&1
echo -e "\e[94m Cloning the beast-splitter git repository locally...\e[97m"
echo -e ""
git clone https://github.com/flightaware/beast-splitter.git 2>&1
log_message "Entering the beast-splitter build directory"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter
log_message "Cloning the FlightAware dump978 git repository"
echo ""
git clone https://github.com/flightaware/beast-splitter.git 2>&1 | tee -a $RECEIVER_LOG_FILE
fi
echo ""


## BUILD AND INSTALL
## BUILD AND INSTALL THE BEAST-SPLITTER PACKAGE

echo -e "\e[95m Building and installing the beast-splitter package...\e[97m"
echo -e ""
log_heading "Building the beast-splitter package"

echo -e "\e[94m Entering the beast-splitter git repository directory...\e[97m"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter 2>&1
log_message "Entering the beast-splitter Git repository"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter

echo -e "\e[94m Executing the beast-splitter build script...\e[97m"
echo -e ""
dpkg-buildpackage -b 2>&1
echo -e ""

echo -e "\e[94m Entering the beast-splitter build directory...\e[97m"
cd $RECEIVER_BUILD_DIRECTORY/beast-splitter 2>&1
log_message "Building the beast-splitter package"
echo ""
dpkg-buildpackage -b 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""

echo -e "\e[94m Installing the beast-splitter package...\e[97m"
log_message "Installing the beast-splitter Debian package"
echo ""
sudo dpkg -i beast-splitter_*.deb 2>&1
sudo dpkg -i $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter_*.deb 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""

# Archive binary package
log_message "Checking that the beast-splitter Debian package was installed"
if [[ $(dpkg-query -W -f='${STATUS}' beast-splitter 2>/dev/null | grep -c "ok installed") -eq 0 ]]; then
echo ""
log_alert_heading "INSTALLATION HALTED"
echo ""
log_alert_message "The beast-splitter Debian package failed to install"
log_alert_message "Setup has been terminated"
echo ""
log_title_message "------------------------------------------------------------------------------"
log_title_heading "beast-splitter setup halted"
echo ""
read -p "Press enter to continue..." discard
exit 1
fi

if [[ ! -d $RECEIVER_BUILD_DIRECTORY/package-archive ]]; then
echo -e "\e[94m Creating package archive directory...\e[97m"
log_message "Creating the Debian package archive directory"
echo ""
mkdir -vp $RECEIVER_BUILD_DIRECTORY/package-archive 2>&1
mkdir -v $RECEIVER_BUILD_DIRECTORY/package-archive 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""
fi
echo -e "\e[94m Moving the beast-splitter package into the archive directory...\e[97m"
echo ""
cp -vp $RECEIVER_BUILD_DIRECTORY/beast-splitter/*.deb $RECEIVER_BUILD_DIRECTORY/package-archive/ 2>&1
log_message "Copying the beast-splitter Debian package into the Debian package archive directory"
echo ""
cp -vf $RECEIVER_BUILD_DIRECTORY/beast-splitter/*.deb $RECEIVER_BUILD_DIRECTORY/package-archive/ 2>&1 | tee -a $RECEIVER_LOG_FILE


## CONFIGURATION

## CONFIGURE BEAST SPLITTER
log_heading "Configuring beast-splitter"

echo -e "\e[94m Configuring beast-splitter...\e[97m"
ChangeConfig "ENABLED" $enable_beastsplitter "/etc/default/beast-splitter"
ChangeConfig "INPUT_OPTIONS" $input_options "/etc/default/beast-splitter"
ChangeConfig "OUTPUT_OPTIONS" $output_options "/etc/default/beast-splitter"
log_message "Setting ENABLED to ${enable_beastsplitter}"
change_config "ENABLED" "${enable_beastsplitter}" "/etc/default/beast-splitter"
log_message "Setting INPUT_OPTIONS to ${input_options}"
change_config "INPUT_OPTIONS" "${input_options}" "/etc/default/beast-splitter"
log_message "Setting OUTPUT_OPTIONS to ${output_options}"
change_config "OUTPUT_OPTIONS" "${output_options}" "/etc/default/beast-splitter"

if [[ "${enable_beastsplitter}" == "true" ]]; then
log_message "Starting the beast-splitter process"
sudo systemctl start beast-splitter
else
log_message "Making sure beast-splitter is not running"
sudo systemctl stop beast-splitter
fi


## SETUP COMPLETE

# Return to the project root directory
echo -e "\e[94m Entering the ADS-B Receiver Project root directory...\e[97m"
cd $RECEIVER_ROOT_DIRECTORY 2>&1
log_message "Returning to ${RECEIVER_PROJECT_TITLE} root directory"
cd $RECEIVER_ROOT_DIRECTORY

echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m beast-splitter setup is complete.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]]; then
read -p "Press enter to continue..." discard
fi
echo ""
log_title_message "------------------------------------------------------------------------------"
log_title_heading "beast-splitter setup is complete"
echo ""
read -p "Press enter to continue..." discard

exit 0
Loading

0 comments on commit dec90d9

Please sign in to comment.