Skip to content

Commit

Permalink
Testing and debugging after changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazka committed Jul 24, 2024
1 parent 6e5727a commit af5b30d
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 64 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
EXTRAS_CHOICES
FEEDER_CHOICES
build/adsbexchange
build/airplaneslive
build/beast-splitter
build/duckdns
build/dump1090*
build/dump978*
build/flightradar24
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
9 changes: 6 additions & 3 deletions bash/extras/beastsplitter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
31 changes: 15 additions & 16 deletions bash/extras/duckdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,39 @@ 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 ""
log_title_message "------------------------------------------------------------------------------"
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 ""
log_title_message "------------------------------------------------------------------------------"
log_title_heading "Duck DNS setup halted"
exit 1
fi
token_title="Duck DNS Token (REQUIRED)"
duckdns_token_title="Duck DNS Token (REQUIRED)"
done


Expand All @@ -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"
Expand All @@ -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 ""
Expand Down
19 changes: 13 additions & 6 deletions bash/feeders/airplaneslive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 ""
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions bash/feeders/flyitalyadsb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
11 changes: 4 additions & 7 deletions bash/feeders/planefinder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
9 changes: 4 additions & 5 deletions bash/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit af5b30d

Please sign in to comment.