The Opensky Network script now uses new logging functions.

pull/593/head
jprochazka 2024-07-22 00:17:45 -04:00
rodzic b83cd9c1ca
commit 4920790504
5 zmienionych plików z 50 dodań i 46 usunięć

Wyświetl plik

@ -41,7 +41,6 @@ CheckPackage librtlsdr-dev
CheckPackage libsoapysdr-dev
CheckPackage lighttpd
CheckPackage pkg-config
echo ""
## BLACKLIST UNWANTED RTL-SDR MODULES

Wyświetl plik

@ -98,7 +98,6 @@ CheckPackage libboost-regex-dev
CheckPackage libboost-system-dev
CheckPackage libsoapysdr-dev
CheckPackage soapysdr-module-rtlsdr
echo ""
## BLACKLIST UNWANTED RTL-SDR MODULES

Wyświetl plik

@ -10,7 +10,6 @@ LogProjectName ${RECEIVER_PROJECT_TITLE}
LogTitleHeading "Setting up the Fly Italy ADS-B client"
LogTitleMessage "------------------------------------------------------------------------------"
echo ""
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Fly Italy ADS-B feeder client Setup" \
--yesno "The Fly Italy ADS-B feeder client takes data from a local dump1090 instance and shares this with Fly Italy ADS-B. for more information please see their website:\n\n https://flyitalyadsb.com/come-condividere-la-propria-antenna/\n\nContinue setup by installing the Fly Italy ADS-B feeder client?" \

Wyświetl plik

@ -1,77 +1,86 @@
#!/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 OpenSky Network feeder client..."
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
echo -e ""
# Confirm component installation.
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "OpenSky Network feeder client Setup" --yesno "The OpenSky Network is a community-based receiver network which continuously collects air traffic surveillance data. Unlike other networks, OpenSky keeps the collected data forever and makes it accessible to researchers. For more information please see their website:\n\n https://opensky-network.org/\n\nContinue setup by installing the OpenSky Network 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 OpenSky Network feeder client setup halted.\e[39m"
echo -e ""
read -p "Press enter to continue..." discard
LogProjectName ${RECEIVER_PROJECT_TITLE}
LogTitleHeading "Setting up the OpenSky Network client"
LogTitleMessage "------------------------------------------------------------------------------"
echo ""
if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "OpenSky Network feeder client Setup" \
--yesno "The OpenSky Network is a community-based receiver network which continuously collects air traffic surveillance data. Unlike other networks, OpenSky keeps the collected data forever and makes it accessible to researchers. For more information please see their website:\n\n https://opensky-network.org/\n\nContinue setup by installing the OpenSky Network feeder client?" \
13 78; then
LogAlertHeading "INSTALLATION HALTED"
LogAlertMessage "Setup has been halted at the request of the user"
echo ""
LogTitleMessage "------------------------------------------------------------------------------"
LogTitleHeading "OpenSky Network client setup halted"
echo ""
exit 1
fi
## CHECK FOR PREREQUISITE PACKAGES
LogHeading "Installing packages needed to fulfill OpenSky Network client dependencies"
CheckPackage apt-transport-https
## ADD THE OPENSKY NETWORK APT REPOSITORY TO THE SYSTEM IF IT DOES NOT ALREADY EXIST
echo -e "\e[95m Setting up the OpenSky Network apt repository if it has not yet been setup...\e[97m"
echo ""
LogHeading "Setting up the OpenSky Network apt repository if it has not yet been setup...\e[97m"
LogMessage "Checking if the OpenSky Network apt repository is set up"
if ! grep -q "^deb .*opensky." /etc/apt/sources.list /etc/apt/sources.list.d/*; then
echo -e "\e[94m The OpenSky Network apt repository is not set up...\e[97m"
CheckPackage apt-transport-https
echo -e "\e[94m Downloading the OpenSky Network apt repository GPG key...\e[97m"
LogMessage "The OpenSky Network apt repository is not set up"
if [[ ! -d $RECEIVER_BUILD_DIRECTORY/openskynetwork ]]; then
LogMessage "Creating the OpenSky Network build directory"
echo ""
mkdir -vp $RECEIVER_BUILD_DIRECTORY/openskynetwork
echo ""
fi
LogMessage "Entering the OpenSky Network build directory"
cd $RECEIVER_BUILD_DIRECTORY/openskynetwork
LogMessage "Downloading and adding the OpenSky Network apt repository GPG key"
echo ""
wget -O - https://opensky-network.org/files/firmware/opensky.gpg.pub | sudo apt-key add -
wget -v -O $RECEIVER_BUILD_DIRECTORY/openskynetwork/opensky.gpg.pub https://opensky-network.org/files/firmware/opensky.gpg.pub
wget -q -O - https://opensky-network.org/files/firmware/opensky.gpg.pub | sudo apt-key add -
echo ""
echo -e "\e[94m Adding the OpenSky Network apt repository...\e[97m"
LogMessage "Adding the OpenSky Network apt repository"
sudo bash -c "echo deb https://opensky-network.org/repos/debian opensky custom > /etc/apt/sources.list.d/opensky.list"
else
echo -e "\e[94m The OpenSky Network apt repository already exists in /etc/apt/sources.list.d/...\e[97m"
LogMessage "The OpenSky Network apt repository is already set up"
fi
echo ""
## INSTALL THE OPENSKY NETWORK FEEDER PACKAGE USING APT
echo -e "\e[95m Installing the OpenSky Network feeder package...\e[97m"
echo ""
LogHeading "Installing the OpenSky Network feeder package"
echo -e "\e[94m Downloading the latest package lists for all enabled repositories and PPAs...\e[97m"
LogMessage "Downloading the latest package lists for all enabled repositories and PPAs"
echo ""
sudo apt-get update
echo ""
echo -e "\e[94m Installing the OpenSky Network fedder package using apt...\e[97m"
LogMessage "Installing the OpenSky Network fedder package using apt"
CheckPackage opensky-feeder
## 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 OpenSky Network feeder client setup is complete.\e[39m"
echo -e ""
echo ""
LogTitleMessage "------------------------------------------------------------------------------"
LogTitleHeading "OpenSky Network client setup is complete"
echo ""
read -p "Press enter to continue..." discard
exit 0

Wyświetl plik

@ -38,7 +38,7 @@ fi
## CHECK FOR PREREQUISITE PACKAGES
LogHeading "Installing packages needed to fulfill dependencies for FlightAware PiAware client"
LogHeading "Installing packages needed to fulfill FlightAware PiAware client dependencies"
CheckPackage autoconf
CheckPackage build-essential
@ -77,8 +77,6 @@ else
CheckPackage tcl-tls
fi
echo ""
## CLONE OR PULL THE TCLTLS REBUILD GIT REPOSITORY