Testing and debugging after changes.

pull/593/head
jprochazka 2024-07-23 20:38:11 -04:00
rodzic 6e5727ad36
commit af5b30d07c
10 zmienionych plików z 121 dodań i 64 usunięć

4
.gitignore vendored
Wyświetl plik

@ -1,5 +1,9 @@
EXTRAS_CHOICES
FEEDER_CHOICES
build/adsbexchange
build/airplaneslive
build/beast-splitter
build/duckdns
build/dump1090*
build/dump978*
build/flightradar24

Wyświetl plik

@ -13,6 +13,7 @@ The following is a history of the changes made to this project.
* 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.
## v2.8.4 *(July 13th, 2024)* :rooster:

Wyświetl plik

@ -27,6 +27,8 @@ fi
## GATHER REQUIRED INFORMATION FROM THE USER
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" \
@ -41,7 +43,7 @@ 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)
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"
@ -55,7 +57,7 @@ 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)
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"
@ -114,7 +116,9 @@ dpkg-buildpackage -b 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""
log_message "Installing the beast-splitter Debian package"
echo ""
sudo dpkg -i $RECEIVER_BUILD_DIRECTORY/beast-splitter/beast-splitter_*.deb 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""
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
@ -140,7 +144,6 @@ fi
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
echo ""
## CONFIGURATION

Wyświetl plik

@ -37,13 +37,13 @@ check_package curl
log_heading "Gather information required to configure Duck DNS support"
log_message "Asking the user for the sub domain to be assigned to this device"
domain_title="Duck DNS Sub Domain"
while [[ -z $domain ]] ; do
domain=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title $domain_title \
duckdns_domain_title="Duck DNS Sub Domain"
while [[ -z $duckdns_domain ]]; do
duckdns_domain=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "${duckdns_domain_title}" \
--inputbox "\nPlease enter the Duck DNS sub domain you selected after registering.\nIf you do not have one yet visit http://www.ducknds.org to obtain one." \
9 78)
if [[ $domain == 0 ]]; then
9 78 3>&1 1>&2 2>&3)
if [[ $duckdns_domain == 0 ]]; then
log_alert_heading "INSTALLATION HALTED"
log_alert_message "Setup has been halted due to lack of required information"
echo ""
@ -51,17 +51,17 @@ while [[ -z $domain ]] ; do
log_title_heading "Duck DNS decoder setup halted"
exit 1
fi
domain_title="Duck DNS Sub Domain (REQUIRED)"
duckdns_domain_title="Duck DNS Sub Domain (REQUIRED)"
done
log_message "Asking the user for the Duck DNS token"
token_title="Duck DNS Token"
while [[ -z "${DUCKDNS_TOKEN}" ]] ; do
token=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title $token_title \
duckdns_token_title="Duck DNS Token"
while [[ -z $duckdns_token ]]; do
duckdns_token=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "${duckdns_token_title}" \
--inputbox "\nPlease enter your Duck DNS token." \
8 78)
if [[ $domain == 0 ]]; then
8 78 3>&1 1>&2 2>&3)
if [[ $duckdns_domain == 0 ]]; then
log_alert_heading "INSTALLATION HALTED"
log_alert_message "Setup has been halted due to lack of required information"
echo ""
@ -69,7 +69,7 @@ while [[ -z "${DUCKDNS_TOKEN}" ]] ; do
log_title_heading "Duck DNS setup halted"
exit 1
fi
token_title="Duck DNS Token (REQUIRED)"
duckdns_token_title="Duck DNS Token (REQUIRED)"
done
@ -86,7 +86,7 @@ fi
log_message "Creating the Duck DNS update script"
tee $RECEIVER_BUILD_DIRECTORY/duckdns/duck.sh > /dev/null <<EOF
echo url="https://www.duckdns.org/update?domains=${DUCKDNS_DOMAIN}&token=${DUCKDNS_TOKEN}&ip=" | curl -k -o $RECEIVER_BUILD_DIRECTORY/duckdns/duck.log
echo url="https://www.duckdns.org/update?domains=${duckdns_domain}&token=${duckdns_token}&ip=" | curl -k -o $RECEIVER_BUILD_DIRECTORY/duckdns/duck.log
EOF
log_message "Adding execute permissions for only this user to the Duck DNS update script"
@ -99,7 +99,6 @@ sudo tee /etc/cron.d/duckdns_ip_address_update > /dev/null <<EOF
# Updates IP address with duckdns.org
*/5 * * * * $RECEIVER_BUILD_DIRECTORY/duckdns/duck.sh >/dev/null 2>&1
EOF
echo ""
log_message "Executing the Duck DNS update script"
echo ""

Wyświetl plik

@ -24,6 +24,13 @@ if ! whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
fi
## CHECK FOR PREREQUISITE PACKAGES
log_heading "Installing packages needed to fulfill FlightAware Dump1090 decoder dependencies"
check_package net-tools
## DOWNLOAD AND EXECUTE THE AIRPLANES.LIVE CLIENT INSTALL SCRIPT
log_heading "Begining the airplanes.live client installation process"
@ -46,7 +53,6 @@ cd $RECEIVER_BUILD_DIRECTORY/airplaneslive
log_message "Downloading the airplanes.live client installation script"
echo ""
wget -v -O $RECEIVER_BUILD_DIRECTORY/airplaneslive/install.sh https://raw.githubusercontent.com/airplanes-live/feed/main/install.sh 2>&1 | tee -a $RECEIVER_LOG_FILE
echo ""
log_message "Executing the airplanes.live client installation script"
echo ""
@ -59,13 +65,14 @@ echo ""
log_heading "Checking if the reciver is now feeding airplanes.live"
log_message "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"* ]]
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"* ]]; then
log_message "This device appears to be connected to airplanes.live"
else
log_alert_message "The receiver does not appear to be feeding airplanes.live at this time...\e[97m"
log_alert_message "Please reboot your device and run the command 'netstat -t -n | grep -E '30004|31090' to see if a connection has been astablished."
log_alert_message "If the issue presists supply the last 20 lines given by the following command on the airplanes.live discord."
echo ""
log_alert_message "The receiver does not appear to be feeding airplanes.live at this time"
log_alert_message "Please reboot your device and run the command 'netstat -t -n | grep -E '30004|31090' to see if a connection has been astablished"
log_alert_message "If the issue presists supply the last 20 lines given by the following command on the airplanes.live discord"
log_alert_message " 'sudo journalctl -u airplanes-feed --no-pager'"
log_alert_message " 'sudo journalctl -u airplanes-mlat --no-pager'"
fi

Wyświetl plik

@ -31,9 +31,8 @@ log_heading "Begining the Fly Italy ADS-B client installation process"
log_message "Informing the user of how the installation process will work"
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "Fly Italy ADS-B Client 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." \
--msgbox "Scripts supplied by Fly Italy ADS-B 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/flyitalyadsb ]]; then
log_message "Creating the Fly Italy ADS-B build directory"
echo ""

Wyświetl plik

@ -46,17 +46,14 @@ log_heading "Begining the PlaneFinder client installation process"
log_message "Determining which Debian package to install"
case "${RECIEVER_CPU_ARCHITECTURE}" in
"armv7l"|"armv6l")
package_name="pfclient_${PLANEFINDER_CLIENT_VERSION_ARMHF}_armhf.deb"
;;
"aarch64")
package_name="pfclient_${PLANEFINDER_CLIENT_VERSION_ARM64}_armhf.deb"
"armv7l"|"armv6l"|"aarch64")
package_name="pfclient_${pfclient_current_version_armhf}_armhf.deb"
;;
"x86_64")
package_name="pfclient_${PLANEFINDER_CLIENT_VERSION_AMD64}_amd64.deb"
package_name="pfclient_${pfclient_current_version_amd64}_amd64.deb"
;;
"i386")
package_name="pfclient_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb"
package_name="pfclient_${pfclient_current_version_amd64}_i386.deb"
;;
*)
echo ""

Wyświetl plik

@ -91,9 +91,9 @@ if whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
log_project_title
log_title_heading "Downloading and installing the latest updates for your operating system"
log_title_message "------------------------------------------------------------------------------"
log_heading "Updating the operating system"
log_message "Updating the operating system using apt-get"
echo ""
sudo apt-get -y dist-upgrade 2>&1 | tee -a $RECEIVER_LOG_FILE
@ -107,10 +107,9 @@ fi
## EXECUTE BASH/MAIN.SH
log_heading "Executing the script bash/main.sh"
clear
log_message "Adding execute permissions to bash/main"
chmod +x $RECEIVER_BASH_DIRECTORY/main.sh
log_heading "Executing the script bash/main.sh"
log_message "Executing bash/main"
bash $RECEIVER_BASH_DIRECTORY/main.sh

Wyświetl plik

@ -12,7 +12,7 @@ source ${RECEIVER_BASH_DIRECTORY}/functions.sh
install_1090mhz_decoder="false"
if [[ $(dpkg-query -W -f='${STATUS}' dump1090-fa 2>/dev/null | grep -c "ok installed") == 1 ]] ; then
chosen_1090mhz_decoder="dump1090-fa"
if [[ $(sudo dpkg -s dump1090-fa 2>/dev/null | grep -c "Version: ${dump1090-fa_current_version}") == 0 ]] ; then
if [[ $(sudo dpkg -s dump1090-fa 2>/dev/null | grep -c "Version: ${dump1090_fa_current_version}") == 0 ]] ; then
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "FlightAware Dump1090 Upgrade Available" \
--defaultno \
@ -47,7 +47,7 @@ function install_dump1090-fa() {
install_978mhz_decoder="false"
if [[ $(dpkg-query -W -f='${STATUS}' dump978-fa 2>/dev/null | grep -c "ok installed") == 1 ]]; then
chosen_978mhz_decoder="dump978-fa"
if [[ $(sudo dpkg -s dump978-fa 2>/dev/null | grep -c "Version: ${dump978-fa_current_version}") == 0 ]]; then
if [[ $(sudo dpkg -s dump978-fa 2>/dev/null | grep -c "Version: ${dump978_fa_current_version}") == 0 ]]; then
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
--title "FlightAware dump978 Upgrade Available" \
--defaultno --yesno "An updated version of FlightAware dump978 is available.\n\nWould you like to install the new version?" \
@ -74,6 +74,7 @@ function install_dump978-fa() {
fi
}
## AGGREGATE SITE CLIENTS
declare array feeder_list
@ -82,7 +83,7 @@ touch ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
# ADS-B Exchange
if [[ -f /lib/systemd/system/adsbexchange-mlat.service && -f /lib/systemd/system/adsbexchange-feed.service ]]; then
echo "ADS-B Exchange Feed Client (reinstall)" >> ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
feeder_list=("${feeder_list[@]}" 'ADS-B Exchange Feed Client (reinstall)' '' OFF)
feeder_list=("${feeder_list[@]}" 'ADS-B Exchange Feed Client (reinstall/update)' '' OFF)
else
echo "ADS-B Exchange Feed Client" >> ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
feeder_list=("${feeder_list[@]}" 'ADS-B Exchange Feed Client' '' OFF)
@ -149,7 +150,7 @@ function install_flightradar24_client() {
# Fly Italy ADS-B
if [[ -f /lib/systemd/system/flyitalyadsb-mlat.service && -f /lib/systemd/system/flyitalyadsb-feed.service ]]; then
echo "Fly Italy ADS-B Feeder (upgrade)" >> ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
feeder_list=("${feeder_list[@]}" 'Fly Italy ADS-B Feeder (upgrade)' '' OFF)
feeder_list=("${feeder_list[@]}" 'Fly Italy ADS-B Feeder (reinstall)' '' OFF)
else
echo "Fly Italy ADS-B Feeder" >> ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
feeder_list=("${feeder_list[@]}" 'Fly Italy ADS-B Feeder' '' OFF)
@ -166,9 +167,7 @@ function install_flyitalyadsb_client() {
if [[ $(dpkg-query -W -f='${STATUS}' opensky-feeder 2>/dev/null | grep -c "ok installed") == 0 ]]; then
feeder_list=("${feeder_list[@]}" 'OpenSky Network Feeder' '' OFF)
else
if [[ $(sudo dpkg -s opensky-feeder 2>/dev/null | grep -c "Version: ${opensky-feeder_current_version}") == 0 ]]; then
feeder_list=("${feeder_list[@]}" 'OpenSky Network Feeder (upgrade)' '' OFF)
else
if [[ $(sudo dpkg -s opensky-feeder 2>/dev/null | grep -c "Version: ${opensky_feeder_current_version}") == 0 ]]; then
feeder_list=("${feeder_list[@]}" 'OpenSky Network Feeder (reinstall)' '' OFF)
fi
fi
@ -245,6 +244,7 @@ whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" \
14 78
if [[ $? == 0 ]]; then
install_portal="true"
fi
function install_adsb-portal() {
${RECEIVER_BASH_DIRECTORY}/portal/install.sh
@ -266,7 +266,7 @@ else
extras_list=("${extras_list[@]}" 'beast-splitter (reinstall)' '' OFF)
fi
function install_beast-splitter() {
function install_beastsplitter() {
chmod +x ${RECEIVER_BASH_DIRECTORY}/extras/beeastsplitter.sh
${RECEIVER_BASH_DIRECTORY}/extras/beastsplitter.sh
if [[ $? != 0 ]] ; then
@ -283,7 +283,7 @@ else
extras_list=("${extras_list[@]}" 'Duck DNS Free Dynamic DNS Hosting (reinstall)' '' OFF)
fi
function install_duck-dns() {
function install_duckdns() {
chmod +x ${RECEIVER_BASH_DIRECTORY}/extras/duckdns.sh
${RECEIVER_BASH_DIRECTORY}/extras/duckdns.sh
if [[ $? -ne 0 ]] ; then
@ -387,54 +387,102 @@ if [[ "${install_978mhz_decoder}" == "true" ]]; then
esac
fi
run_adsbexchange_script="false"
run_airplaneslive_script="false"
run_flightaware_script="false"
run_flightradar24_script="false"
run_flyitalyadsb_script="false"
run_openskynetwork_script="false"
run_planefinder_script="false"
# Aggragate site clients
if [[ -s "${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES" ]]; then
while read feeder_choice
do
case ${feeder_choice} in
"ADS-B Exchange Feeder"|"ADS-B Exchange Feeder (reinstall)")
install_adsbexchange_client
"ADS-B Exchange Feed Client"|"ADS-B Exchange Feed Client (reinstall/update)")
run_adsbexchange_script="true"
;;
"Airplanes.live Feeder"|"Airplanes.live Feeder (reinstall)")
install_airplaneslive_client
run_airplaneslive_script="true"
;;
"FlightAware PiAware"|"FlightAware PiAware (upgrade)"|"FlightAware PiAware (reinstall)")
install_flightaware_client
run_flightaware_script="true"
;;
"Flightradar24 Client"|"Flightradar24 Client (upgrade)"|"Flightradar24 Client (reinstall)")
install_flightradar24_client
run_flightradar24_script="true"
;;
"Fly Italy ADS-B Feeder"|"Fly Italy ADS-B Feeder (upgrade)")
install_flyitalyadsb_client
"Fly Italy ADS-B Feeder"|"Fly Italy ADS-B Feeder (reinstall)")
run_flyitalyadsb_script="true"
;;
"OpenSky Network Feeder")
install_openskynetwork_client
"OpenSky Network Feeder"|"OpenSky Network Feeder (reinstall)")
run_openskynetwork_script="true"
;;
"Plane Finder Client"|"Plane Finder Client (upgrade)"|"Plane Finder Client (reinstall)")
install_planefinder_client
run_planefinder_script="true"
;;
esac
done < ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
fi
if [[ "${run_adsbexchange_script}" == "true" ]]; then
install_adsbexchange_client
fi
if [[ "${run_airplaneslive_script}" == "true" ]]; then
install_airplaneslive_client
fi
if [[ "${run_flightaware_script}" == "true" ]]; then
install_flightaware_client
fi
if [[ "${run_flightradar24_script}" == "true" ]]; then
install_flightradar24_client
fi
if [[ "${run_flyitalyadsb_script}" == "true" ]]; then
install_flyitalyadsb_client
fi
if [[ "${run_openskynetwork_script}" == "true" ]]; then
install_openskynetwork_client
fi
if [[ "${run_planefinder_script}" == "true" ]]; then
install_planefinder_client
fi
# Portals
if [[ "${install_portal}" == "true" ]]; then
install_adsb-portal
fi
# Extras
run_beastsplitter_script="false"
run_duckdns_script="false"
if [[ -s "${RECEIVER_ROOT_DIRECTORY}/EXTRAS_CHOICES" ]]; then
while read extras_choice
do
case ${extras_choice} in
"beast-splitter"|"beast-splitter (reinstall)")
install_beast-splitter
run_beastsplitter_script="true"
;;
"Duck DNS Free Dynamic DNS Hosting"|"Duck DNS Free Dynamic DNS Hosting (reinstall)")
install_duck-dns
run_duckdns_script="true"
;;
esac
done < ${RECEIVER_ROOT_DIRECTORY}/EXTRAS_CHOICES
fi
if [[ "${run_adsbexchange_script}" == "true" ]]; then
install_beastsplitter
fi
if [[ "${run_duckdns_script}" == "true" ]]; then
install_duckdns
fi
exit 0

Wyświetl plik

@ -18,8 +18,8 @@ display_true_inline="\033[2;32m"
## SOFTWARE VERSIONS
# FlightAware
dump1090-fa_current_version="9.0"
dump978-fa_current_version="9.0"
dump1090_fa_current_version="9.0"
dump978_fa_current_version="9.0"
piaware_current_version="9.0.1"
# PlaneFinder Client
@ -29,7 +29,7 @@ pfclient_current_version_amd64="5.0.162"
pfclient_current_version_i386="5.0.161"
# Flightradar24 Client
fr24feed_current_version="1.0.18-5"
fr24feed_current_version="1.0.48-0"
# OpenSky Network Client
opensky-feeder_current_version="2.1.7-1"
opensky_feeder_current_version="2.1.7-1"