kopia lustrzana https://github.com/jprochazka/adsb-receiver
Many install related bug fixes and updates.
rodzic
906205f3e9
commit
5231d143ee
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -2,6 +2,23 @@
|
|||
|
||||
The following is a history of the changes made to this project.
|
||||
|
||||
## v2.6.1 *(prerelease)*
|
||||
|
||||
* Fixes to issues contained within maintenance.py. (thanks to @mkrzysztofowicz)
|
||||
* Dump1090-mutability wget permission error fixed. (thanks to SCX77)
|
||||
* The option to upgrade the Planefinder client now appears when one is available.
|
||||
* Updated to install planfinder.net ARM client version 3.7.40.
|
||||
* Updated to install PiAware version 3.5.3.
|
||||
* The version of mlat-client installed has been reverted back to v0.2.6 from v0.2.9.
|
||||
* Fixed path variable to where the built dump1090-mutability packages are archived.
|
||||
* Fixed path variable used to check if the ADS-B Exchange build directory exists.
|
||||
* Simplified and fixed lines killing existing ADS-B Exchange processes during reinstallation.
|
||||
* Simplified and fixed lines killing existing AboveTustin processes during reinstallation.
|
||||
* Simplified and fixed lines killing existing BeastSplitter processes during reinstallation.
|
||||
* Fixed many minor bash script output syntax and formating issues.
|
||||
* Some Whiptail dialogs have been expanded to be more descriptive.
|
||||
* AboveTustin script was not retriving the current longitude when upgrading it.
|
||||
|
||||
## v2.6.0 *(October 21st, 2017)*
|
||||
|
||||
* Added "Extras" option to install process.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2017, Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018, Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -119,7 +119,9 @@ echo -e ""
|
|||
## SETUP UDEV RTL-SDR RULES
|
||||
|
||||
echo -e "\e[94m Downloading RTL-SDR udev rules...\e[97m"
|
||||
echo ""
|
||||
sudo curl --http1.1 https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules --output /etc/udev/rules.d/rtl-sdr.rules
|
||||
echo ""
|
||||
echo -e "\e[94m Restarting udev...\e[97m"
|
||||
sudo service udev restart
|
||||
|
||||
|
@ -209,7 +211,7 @@ if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
|
|||
# Archive binary package.
|
||||
echo -e "\e[94m Moving the dump1090-mutability binary package into the archive directory...\e[97m"
|
||||
echo -e ""
|
||||
cp -vf ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive/ 2>&1
|
||||
cp -vf ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/*.deb ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/package-archive/ 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2016 Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018 Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -57,7 +57,7 @@ echo -e "\e[92m Setting up AboveTustin..."
|
|||
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
|
||||
echo -e ""
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "AboveTustin Setup" --yesno "AboveTustin is an ADS-B Twitter Bot. Uses dump1090-mutability to track airplanes and then tweets whenever an airplane flies overhead.\n\n https://github.com/kevinabrandon/AboveTustin\n\nContinue setting up AboveTustin?" 13 78
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "AboveTustin Setup" --yesno "AboveTustin is an ADS-B Twitter Bot. Uses dump1090-mutability to track airplanes and then tweets whenever an airplane flies overhead.\n\n https://github.com/kevinabrandon/AboveTustin\n\nContinue setting up AboveTustin?" 12 78
|
||||
if [[ $? -eq 1 ]] ; then
|
||||
# Setup has been halted by the user.
|
||||
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
|
||||
|
@ -269,7 +269,7 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
|||
TWITTER_ACCESS_TOKEN=$(grep "^access_token =" "${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini" | awk '{print $3}')
|
||||
fi
|
||||
fi
|
||||
TWITTER_ACCESS_TOKEN=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_ACCESS_TOKEN_TITLE}" --nocancel --inputbox "\nEnter your Twitter Access Token." 7 78 "${TWITTER_ACCESS_TOKEN}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_ACCESS_TOKEN=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_ACCESS_TOKEN_TITLE}" --nocancel --inputbox "\nEnter your Twitter Access Token." 8 78 "${TWITTER_ACCESS_TOKEN}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_ACCESS_TOKEN_TITLE="Twitter Access Token (REQUIRED)"
|
||||
done
|
||||
#
|
||||
|
@ -280,7 +280,7 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
|||
TWITTER_ACCESS_TOKEN_SECRET=$(grep "^access_token_secret =" "${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini" | awk '{print $3}')
|
||||
fi
|
||||
fi
|
||||
TWITTER_ACCESS_TOKEN_SECRET=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_ACCESS_TOKEN_SECRET_TITLE}" --nocancel --inputbox "\nEnter your Twitter Access Token Secret." 7 78 "${TWITTER_ACCESS_TOKEN_SECRET}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_ACCESS_TOKEN_SECRET=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_ACCESS_TOKEN_SECRET_TITLE}" --nocancel --inputbox "\nEnter your Twitter Access Token Secret." 8 78 "${TWITTER_ACCESS_TOKEN_SECRET}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_ACCESS_TOKEN_SECRET_TITLE="Twitter Access Token Secret (REQUIRED)"
|
||||
done
|
||||
#
|
||||
|
@ -291,7 +291,7 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
|||
TWITTER_CONSUMER_KEY=$(grep "^consumer_key =" "${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini" | awk '{print $3}')
|
||||
fi
|
||||
fi
|
||||
TWITTER_CONSUMER_KEY=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_CONSUMER_KEY_TITLE}" --nocancel --inputbox "\nEnter your Twitter Consumer Key." 7 78 "${TWITTER_CONSUMER_KEY}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_CONSUMER_KEY=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_CONSUMER_KEY_TITLE}" --nocancel --inputbox "\nEnter your Twitter Consumer Key." 8 78 "${TWITTER_CONSUMER_KEY}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_CONSUMER_KEY_TITLE="Twitter Consumer Key (REQUIRED)"
|
||||
done
|
||||
#
|
||||
|
@ -302,7 +302,7 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
|||
TWITTER_CONSUMER_SECRET=$(grep "^consumer_secret =" "${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini" | awk '{print $3}')
|
||||
fi
|
||||
fi
|
||||
TWITTER_CONSUMER_SECRET=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_CONSUMER_SECRET_TITLE}" --nocancel --inputbox "\nEnter your Twitter Consumer Secret." 7 78 "${TWITTER_CONSUMER_SECRET}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_CONSUMER_SECRET=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${TWITTER_CONSUMER_SECRET_TITLE}" --nocancel --inputbox "\nEnter your Twitter Consumer Secret." 8 78 "${TWITTER_CONSUMER_SECRET}" 3>&1 1>&2 2>&3)
|
||||
TWITTER_CONSUMER_SECRET_TITLE="Twitter Consumer Secret (REQUIRED)"
|
||||
done
|
||||
fi
|
||||
|
@ -332,7 +332,7 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
|||
RECEIVER_LONGITUDE_TITLE="Receiver Longitude"
|
||||
while [[ -z "${RECEIVER_LONGITUDE}" ]] ; do
|
||||
if [[ -f ${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini ]]; then
|
||||
if [[ `grep "^longitude = ${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini | awk '{print $3}' | wc -c` -gt 1 ]] ; then
|
||||
if [[ `grep "^longitude = " ${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini | awk '{print $3}' | wc -c` -gt 1 ]] ; then
|
||||
RECEIVER_LONGITUDE=$(grep "^longitude =" ${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin/config.ini | awk '{print $3}')
|
||||
RECEIVER_LONGITUDE_SOURCE=", the value below is configured in AboveTustin"
|
||||
fi
|
||||
|
@ -586,6 +586,7 @@ if [[ -d "${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin" ]] && [[ -d "${RE
|
|||
cd ${RECEIVER_BUILD_DIRECTORY}/abovetustin/AboveTustin 2>&1
|
||||
echo -e ""
|
||||
echo -e "\e[94m Updating the local AboveTustin git repository...\e[97m"
|
||||
echo ""
|
||||
git pull 2>&1
|
||||
echo -e ""
|
||||
else
|
||||
|
@ -673,17 +674,20 @@ echo -e ""
|
|||
echo -e "\e[95m Starting AboveTustin...\e[97m"
|
||||
echo -e ""
|
||||
|
||||
# Kill any currently running instances.
|
||||
PROCS="run_tracker.sh tracker.py phantomjs"
|
||||
for PROC in ${PROCS} ; do
|
||||
PIDS=`ps -efww | grep -w "${PROC} " | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [[ -n "${PIDS}" ]] ; then
|
||||
echo -e "\e[94m Killing any running ${PROC} processes...\e[97m"
|
||||
sudo kill ${PIDS} 2>&1
|
||||
sudo kill -9 ${PIDS} 2>&1
|
||||
fi
|
||||
unset PIDS
|
||||
done
|
||||
# Kill any currently running AboveTustin related processes.
|
||||
echo -e "\e[94m Checking for any running AboveTustin processes...\e[97m"
|
||||
if [[ $(ps -aux | grep '[r]un_tracker.sh' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current run_tracker.sh process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[r]un_tracker.sh' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
if [[ $(ps -aux | grep '[t]racker.py' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current tracker.py process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[t]racker.py' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
if [[ $(ps -aux | grep '[p]hantomjs' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current phantomjs process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[p]hantomjs' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
|
||||
# Start the run_tracker.sh script.
|
||||
echo -e "\e[94m Executing the run_tracker.sh script...\e[97m"
|
||||
|
|
|
@ -228,16 +228,15 @@ echo -e "\e[95m Starting beast-splitter...\e[97m"
|
|||
echo -e ""
|
||||
|
||||
# Kill any currently running instances.
|
||||
PROCS="beast-splitter_maint.sh beast-splitter"
|
||||
for PROC in ${PROCS} ; do
|
||||
PIDS=`ps -efww | grep -w "${PROC} " | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [[ -n "${PIDS}" ]] ; then
|
||||
echo -e "\e[94m Killing any running ${PROC} processes...\e[97m"
|
||||
sudo kill ${PIDS} 2>&1
|
||||
sudo kill -9 ${PIDS} 2>&1
|
||||
fi
|
||||
unset PIDS
|
||||
done
|
||||
echo -e "\e[94m Checking for any running beast-splitter processes...\e[97m"
|
||||
if [[ $(ps -aux | grep '[b]east-splitter_maint.sh' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current beast-splitter_maint.sh process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[b]east-splitter_maint.sh' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
if [[ $(ps -aux | grep '[b]east-splitter' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current beast-splitter process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[b]east-splitter' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
|
||||
# Start the beast-splitter_maint.sh script.
|
||||
echo -e "\e[94m Executing the beast-splitter script...\e[97m"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2016-2017, Joseph A. Prochazka #
|
||||
# Copyright (c) 2016-2018, Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -227,24 +227,24 @@ echo -e "\e[95m Creating maintenance for both the mlat-client and netcat feeds.
|
|||
echo ""
|
||||
|
||||
# Ask the user for the user name for this receiver.
|
||||
RECEIVERNAME_TITLE="Receiver Name"
|
||||
while [[ -z $RECEIVERNAME ]]; do
|
||||
RECEIVERNAME=$(whiptail --backtitle "$ADSB_PROJECTTITLE" --backtitle "$BACKTITLETEXT" --title "$RECEIVERNAME_TITLE" --nocancel --inputbox "\nPlease enter a name for this receiver.\n\nIf you have more than one receiver, this name should be unique.\nExample: \"username-01\", \"username-02\", etc." 12 78 3>&1 1>&2 2>&3)
|
||||
RECEIVERNAME_TITLE="Receiver Name (REQUIRED)"
|
||||
RECEIVER_NAME_TITLE="Receiver Name"
|
||||
while [[ -z $RECEIVER_NAME ]]; do
|
||||
RECEIVER_NAME=$(whiptail --backtitle "$ADSB_PROJECTTITLE" --backtitle "$BACKTITLETEXT" --title "$RECEIVER_NAME_TITLE" --nocancel --inputbox "\nPlease enter a name for this receiver.\n\nIf you have more than one receiver, this name should be unique.\nExample: \"username-01\", \"username-02\", etc." 12 78 3>&1 1>&2 2>&3)
|
||||
RECEIVER_NAME_TITLE="Receiver Name (REQUIRED)"
|
||||
done
|
||||
|
||||
# Get the altitude of the receiver from the Google Maps API using the latitude and longitude assigned dump1090-mutability if it is installed.
|
||||
if [[ $(dpkg-query -W -f='${STATUS}' dump1090-mutability 2>/dev/null | grep -c "ok installed") -eq 0 ]]; then
|
||||
RECEIVERLATITUDE=`GetConfig "LAT" "/etc/default/dump1090-mutability"`
|
||||
RECEIVERLONGITUDE=`GetConfig "LON" "/etc/default/dump1090-mutability"`
|
||||
RECEIVER_LATITUDE=`GetConfig "LAT" "/etc/default/dump1090-mutability"`
|
||||
RECEIVER_LONGITUDE=`GetConfig "LON" "/etc/default/dump1090-mutability"`
|
||||
fi
|
||||
|
||||
# Ask the user for the receivers altitude. (This will be prepopulated by the altitude returned from the Google Maps API.
|
||||
RECEIVERALTITUDE=$(whiptail --backtitle "$ADSB_PROJECTTITLE" --backtitle "$BACKTITLETEXT" --title "Receiver Altitude" --nocancel --inputbox "\nEnter your receiver's altitude." 9 78 "`curl -s https://maps.googleapis.com/maps/api/elevation/json?locations=41.3872537,-82.0769568 | python -c \"import json,sys;obj=json.load(sys.stdin);print obj['results'][0]['elevation']\"`" 3>&1 1>&2 2>&3)
|
||||
RECEIVER_ALTITUDE=$(whiptail --backtitle "$ADSB_PROJECTTITLE" --backtitle "$BACKTITLETEXT" --title "Receiver Altitude" --nocancel --inputbox "\nEnter your receiver's altitude." 9 78 "`curl -s https://maps.googleapis.com/maps/api/elevation/json?locations=41.3872537,-82.0769568 | python -c \"import json,sys;obj=json.load(sys.stdin);print obj['results'][0]['elevation']\"`" 3>&1 1>&2 2>&3)
|
||||
|
||||
# Create the adsbexchange directory in the build directory if it does not exist.
|
||||
echo -e "\e[94m Checking for the adsbexchange build directory...\e[97m"
|
||||
if [ ! -d "$ADSBEXCHANGEBUILDDIRECTORY" ]; then
|
||||
if [ ! -d "$RECEIVER_BUILD_DIRECTORY/adsbexchange" ]; then
|
||||
echo -e "\e[94m Creating the adsbexchange build directory...\e[97m"
|
||||
mkdir $RECEIVER_BUILD_DIRECTORY/adsbexchange
|
||||
fi
|
||||
|
@ -265,7 +265,7 @@ tee $RECEIVER_BUILD_DIRECTORY/adsbexchange/adsbexchange-mlat_maint.sh > /dev/nul
|
|||
while true
|
||||
do
|
||||
sleep 30
|
||||
/usr/bin/mlat-client --input-type dump1090 --input-connect 127.0.0.1:30005 --lat $RECEIVERLATITUDE --lon $RECEIVERLONGITUDE --alt $RECEIVERALTITUDE --user $RECEIVERNAME --server feed.adsbexchange.com:31090 --no-udp --results beast,connect,127.0.0.1:30104
|
||||
/usr/bin/mlat-client --input-type dump1090 --input-connect 127.0.0.1:30005 --lat $RECEIVER_LATITUDE --lon $RECEIVER_LONGITUDE --alt $RECEIVER_ALTITUDE --user $RECEIVER_NAME --server feed.adsbexchange.com:31090 --no-udp --results beast,connect,127.0.0.1:30104
|
||||
done
|
||||
EOF
|
||||
|
||||
|
@ -297,32 +297,24 @@ echo ""
|
|||
|
||||
# Kill any currently running instances of the adsbexchange-netcat_maint.sh script.
|
||||
echo -e "\e[94m Checking for any running adsbexchange-netcat_maint.sh processes...\e[97m"
|
||||
PIDS=`ps -efww | grep -w "adsbexchange-netcat_maint.sh" | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
echo -e "\e[94m Killing any running adsbexchange-netcat_maint.sh processes...\e[97m"
|
||||
sudo kill $PIDS
|
||||
sudo kill -9 $PIDS
|
||||
if [[ $(ps -aux | grep '[a]dsbexchange-netcat_maint.sh' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current adsbexchange-netcat_maint.sh process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[a]dsbexchange-netcat_maint.sh' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
PIDS=`ps -efww | grep -w "/bin/nc feed.adsbexchange.com" | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
echo -e "\e[94m Killing any running netcat processes...\e[97m"
|
||||
sudo kill $PIDS
|
||||
sudo kill -9 $PIDS
|
||||
if [[ $(ps -aux | grep '[f]eed.adsbexchange.com' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current feed.adsbexchange.com process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[f]eed.adsbexchange.com' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
|
||||
# Kill any currently running instances of the adsbexchange-mlat_maint.sh script.
|
||||
echo -e "\e[94m Checking for any running adsbexchange-mlat_maint.sh processes...\e[97m"
|
||||
PIDS=`ps -efww | grep -w "adsbexchange-mlat_maint.sh" | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
echo -e "\e[94m Killing any running adsbexchange-mlat_maint.sh processes...\e[97m"
|
||||
sudo kill $PIDS
|
||||
sudo kill -9 $PIDS
|
||||
if [[ $(ps -aux | grep '[a]dsbexchange-mlat_maint.sh' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current adsbexchange-mlat_maint.sh process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[a]dsbexchange-mlat_maint.sh' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
PIDS=`ps -efww | grep -w "mlat-client" | awk -vpid=$$ '$2 != pid { print $2 }'`
|
||||
if [ ! -z "$PIDS" ]; then
|
||||
echo -e "\e[94m Killing any running mlat-client processes...\e[97m"
|
||||
sudo kill $PIDS
|
||||
sudo kill -9 $PIDS
|
||||
if [[ $(ps -aux | grep 'mlat-client' | awk '{print $2}') ]]; then
|
||||
echo -e "\e[94m Killing the current mlat-client process...\e[97m"
|
||||
sudo kill -9 $(ps -aux | grep '[m]lat-client' | awk '{print $2}') &> /dev/null
|
||||
fi
|
||||
|
||||
echo -e "\e[94m Executing the adsbexchange-netcat_maint.sh script...\e[97m"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2017, Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018, Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -121,6 +121,7 @@ if [[ ! -d ${RECEIVER_BUILD_DIRECTORY}/planefinder ]] ; then
|
|||
echo -e "\e[94m Creating the PlaneFinder ADS-B Client build directory...\e[97m"
|
||||
echo ""
|
||||
mkdir -vp ${RECEIVER_BUILD_DIRECTORY}/planefinder
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Change to the component build directory.
|
||||
|
|
64
bash/main.sh
64
bash/main.sh
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2016 Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018 Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -179,9 +179,9 @@ if [[ $(dpkg-query -W -f='${STATUS}' dump1090-mutability 2>/dev/null | grep -c "
|
|||
DUMP1090_FORK="mutability"
|
||||
DUMP1090_IS_INSTALLED="true"
|
||||
# Skip over this dialog if this installation is set to be automated.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Ask if dump1090-mutability should be reinstalled.
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Dump1090-mutability Installed" --defaultno --yesno "The dump1090-mutability package appears to be installed on your device, however...\n\nThe dump1090-mutability v1.15~dev source code is regularly updated without a change made to the version numbering.\n\nTo ensure you are running the latest version of dump1090-mutability you may opt to rebuild and reinstall this package.\n\nDownload, build, and reinstall this package?" 18 65
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Dump1090-mutability Installed" --defaultno --yesno "The dump1090-mutability package appears to be installed on your device, however...\n\nThe dump1090-mutability v1.15~dev source code is regularly updated without a change made to the version numbering.\n\nTo ensure you are running the latest version of dump1090-mutability you may opt to rebuild and reinstall this package.\n\nDownload, build, and reinstall this package?" 17 65
|
||||
case $? in
|
||||
0)
|
||||
DUMP1090_DO_UPGRADE="true"
|
||||
|
@ -207,7 +207,7 @@ if [[ $(dpkg-query -W -f='${STATUS}' dump1090-fa 2>/dev/null | grep -c "ok insta
|
|||
# Check if a newer version can be installed.
|
||||
if [[ $(sudo dpkg -s dump1090-fa 2>/dev/null | grep -c "Version: ${PIAWARE_VERSION}") -eq 0 ]] ; then
|
||||
# Skip over this dialog if this installation is set to be automated.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
whiptail --backtitle "RECEIVER_PROJECT_TITLE" --title "Dump1090-fa Upgrade Available" --defaultno --yesno "An updated version of dump1090-fa is available.\n\nWould you like to download, build, then install the new version?" 16 65
|
||||
case $? in
|
||||
0)
|
||||
|
@ -231,7 +231,7 @@ fi
|
|||
# If no dump1090 fork is installed then attempt to install one.
|
||||
if [[ ! "${DUMP1090_IS_INSTALLED}" = "true" ]] ; then
|
||||
# If this is not an automated installation ask the user which one to install.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
DUMP1090_OPTION=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Choose Dump1090 Version To Install" --radiolist "The dump1090-mutability or dump1090-fa package does not appear to be installed on this device. In order to continue setup one of the following packages need to be installed. Please select your prefered dump1090 version from the list below.\n\nPlease note that in order to run dump1090-fa PiAware will need to be installed as well." 16 65 2 "dump1090-mutability" "(Mutability)" ON "dump1090-fa" "(FlightAware)" OFF 3>&1 1>&2 2>&3)
|
||||
case ${DUMP1090_OPTION} in
|
||||
"dump1090-mutability")
|
||||
|
@ -268,7 +268,7 @@ if [[ -f "${RECEIVER_BUILD_DIRECTORY}/dump978/dump978" ]] && [[ -f "${RECEIVER_B
|
|||
# Dump978 appears to have been built already.
|
||||
DUMP978_IS_INSTALLED="true"
|
||||
# Prompt user to confirm if a rebuild is required.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Dump978 Installed" --defaultno --yesno "Dump978 appears to be installed on your device, however...\n\nThe dump978 source code may have been updated since it was built last. To ensure you are running the latest version of dump978 you may opt to rebuild the binaries making up dump978.\n\nDownload and rebuild the dump978 binaries?" 14 65
|
||||
case $? in
|
||||
0)
|
||||
|
@ -290,7 +290,7 @@ else
|
|||
# Dump978 does not appear to be present on this device.
|
||||
DUMP978_IS_INSTALLED="false"
|
||||
# Prompt user to confirm if installation is required.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Dump978 Not Installed" --defaultno --yesno "Dump978 is an experimental demodulator/decoder for 978MHz UAT signals. These scripts can setup dump978 for you. However keep in mind a second RTL-SDR device will be required to feed data to it.\n\nDo you wish to install dump978?" 10 65
|
||||
case $? in
|
||||
0)
|
||||
|
@ -317,7 +317,7 @@ if [[ -f "/etc/init.d/rtlsdr-ogn" ]] ; then
|
|||
# Check if a newer version of the binaries are available.
|
||||
if [[ ! -d "${RECEIVER_BUILD_DIRECTORY}/rtlsdr-ogn/rtlsdr-ogn-${RTLSDROGN_VERSION}" ]] ; then
|
||||
# Prompt user to confirm if a rebuild is required.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "RTL-SDR OGN Installed" --defaultno --yesno "A newer version of the RTL-SDR OGN binaries is available.\n\nWould you like to setup the newer binaries on this device?" 14 65
|
||||
case $? in
|
||||
0)
|
||||
|
@ -348,7 +348,7 @@ else
|
|||
RTLSDROGN_DO_INSTALL="false"
|
||||
|
||||
## Prompt user to confirm if installation is required.
|
||||
#if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
#if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "RTL-SDR OGN Not Installed" --defaultno --yesno "RTL-SDR OGN is a combined decoder and feeder for the Open Glider Network which focuses on tracking gilders and other GA aircraft equipped with FLARM, FLARM-compatible devices or OGN tracker.\n\nRTL-SDR OGN will require an additional RTL-SDR dongle to run.\nFLARM is most prevalent within Europe, but new receivers are welcome at any location.\n\nDo you wish to setup RTL-SDR OGN?" 10 65
|
||||
# case $? in
|
||||
# 0)
|
||||
|
@ -383,11 +383,11 @@ if [[ $(dpkg-query -W -f='${STATUS}' mlat-client 2>/dev/null | grep -c "ok insta
|
|||
# Check if installed mlat-client matches the available version.
|
||||
if [[ ! "${MLAT_CLIENT_VERSION_AVAILABLE}" = "${MLAT_CLIENT_VERSION_INSTALLED}" ]] ; then
|
||||
# Prompt user to confirm the upgrade.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'ADS-B Exchange data export and MLAT Client (upgrade)' '' OFF)
|
||||
else
|
||||
# Check the installation configuration file to see if the Planefinder Client is to be upgraded.
|
||||
# Check the installation configuration file to see if the mlat-client Client is to be upgraded.
|
||||
if [[ -z "${ADSBEXCHANGE_INSTALL}" ]] && [[ "${ADSBEXCHANGE_INSTALL}" = "true" ]] && [[ -z "${ADSBEXCHANGE_UPGRADE}" ]] && [[ "${ADSBEXCHANGE_UPGRADE}" = "true" ]] ; then
|
||||
# Since the menu will be skipped add this choice directly to the FEEDER_CHOICES file.
|
||||
echo "ADS-B Exchange data export and MLAT Client (upgrade)" >> ${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
|
||||
|
@ -397,7 +397,7 @@ if [[ $(dpkg-query -W -f='${STATUS}' mlat-client 2>/dev/null | grep -c "ok insta
|
|||
else
|
||||
# The mlat-client package does not appear to be installed.
|
||||
MLAT_CLIENT_IS_INSTALLED="false"
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'ADS-B Exchange data export and MLAT Client' '' OFF)
|
||||
else
|
||||
|
@ -414,7 +414,7 @@ if [[ $(dpkg-query -W -f='${STATUS}' piaware 2>/dev/null | grep -c "ok installed
|
|||
# Do not show the PiAware install option if the FlightAware fork of dump1090 has been chosen.
|
||||
if [[ "${DUMP1090_FORK}" != "fa" ]] ; then
|
||||
# The PiAware package appears to not be installed.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'FlightAware PiAware' '' OFF)
|
||||
else
|
||||
|
@ -428,7 +428,7 @@ if [[ $(dpkg-query -W -f='${STATUS}' piaware 2>/dev/null | grep -c "ok installed
|
|||
else
|
||||
# Check if a newer version can be installed.
|
||||
if [[ $(sudo dpkg -s piaware 2>/dev/null | grep -c "Version: ${PIAWARE_VERSION}") -eq 0 ]] ; then
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'FlightAware PiAware (upgrade)' '' OFF)
|
||||
else
|
||||
|
@ -444,7 +444,7 @@ fi
|
|||
# Check for the Flightradar24 Feeder Client package.
|
||||
if [[ $(dpkg-query -W -f='${STATUS}' fr24feed 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
|
||||
# The Flightradar24 client package does not appear to be installed.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'Flightradar24 Client' '' OFF)
|
||||
else
|
||||
|
@ -458,7 +458,7 @@ else
|
|||
# Check if a newer version can be installed if this is not a Raspberry Pi device.
|
||||
if [[ "${CPU_ARCHITECTURE}" != "armv7l" ]] ; then
|
||||
if [[ $(sudo dpkg -s fr24feed 2>/dev/null | grep -c "Version: ${FLIGHTRADAR24_CLIENT_VERSION_I386}") -eq 0 ]] ; then
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'Flightradar24 Client (upgrade)' '' OFF)
|
||||
else
|
||||
|
@ -475,7 +475,7 @@ fi
|
|||
# Check for the Planefinder ADS-B Client package.
|
||||
if [[ $(dpkg-query -W -f='${STATUS}' pfclient 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
|
||||
# The Planefinder Client package does not appear to be installed.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'Plane Finder Client' '' OFF)
|
||||
else
|
||||
|
@ -488,8 +488,8 @@ if [[ $(dpkg-query -W -f='${STATUS}' pfclient 2>/dev/null | grep -c "ok installe
|
|||
else
|
||||
# Check if a newer version can be installed.
|
||||
if [[ "${CPU_ARCHITECTURE}" = "armv7l" ]] ; then
|
||||
if [[ $(sudo dpkg -s pfclient 2>/dev/null | grep -c "Version: ${PLANEFINDER_CLIENT_VERSION_ARM}") -eq 0 ]] ; then
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! $(sudo dpkg -s pfclient | grep Version | awk '{print $2}') == "$PLANEFINDER_CLIENT_VERSION_ARM" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'Plane Finder Client (upgrade)' '' OFF)
|
||||
else
|
||||
|
@ -501,8 +501,8 @@ else
|
|||
fi
|
||||
fi
|
||||
else
|
||||
if [[ $(sudo dpkg -s pfclient 2>/dev/null | grep -c "Version: ${PLANEFINDER_CLIENT_VERSION_I386}") -eq 0 ]] ; then
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! $(sudo dpkg -s pfclient | grep Version | awk '{print $2}') == "$PLANEFINDER_CLIENT_VERSION_I386" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the FEEDER_LIST array to be used by the whiptail menu.
|
||||
FEEDER_LIST=("${FEEDER_LIST[@]}" 'Plane Finder Client (upgrade)' '' OFF)
|
||||
else
|
||||
|
@ -516,7 +516,7 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
if [[ -n "${FEEDER_LIST}" ]] ; then
|
||||
# Display a checklist containing feeders that are not installed if any.
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Feeder Installation Options" --checklist --nocancel --separate-output "The following feeders are available for installation.\nChoose the feeders you wish to install." 13 65 4 "${FEEDER_LIST[@]}" 2>${RECEIVER_ROOT_DIRECTORY}/FEEDER_CHOICES
|
||||
|
@ -528,9 +528,9 @@ fi
|
|||
|
||||
## ADS-B Receiver Project Web Portal
|
||||
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Ask if the web portal should be installed.
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Install The ADS-B Receiver Project Web Portal" --yesno "The ADS-B Receiver Project Web Portal is a lightweight web interface for dump-1090-mutability installations.\n\nCurrent features include the following:\n Unified navigation between all web pages.\n System and dump1090 performance graphs.\n\nWould you like to install the ADS-B Receiver Project web portal on this device?" 8 78
|
||||
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Install The ADS-B Receiver Project Web Portal" --yesno "The ADS-B Receiver Project Web Portal is a lightweight web interface for dump-1090-mutability installations.\n\nCurrent features include the following:\n Unified navigation between all web pages.\n System and dump1090 performance graphs.\n\nWould you like to install the ADS-B Receiver Project web portal?" 14 78
|
||||
case $? in
|
||||
0)
|
||||
WEBPORTAL_DO_INSTALL="true"
|
||||
|
@ -550,7 +550,7 @@ touch ${RECEIVER_ROOT_DIRECTORY}/EXTRAS_CHOICES
|
|||
# Check if the AboveTustin repository has been cloned.
|
||||
if [[ -d "${RECEIVER_BUILD_DIRECTORY}/AboveTustin" ]] && [[ -d "${RECEIVER_BUILD_DIRECTORY}/AboveTustin/.git" ]] ; then
|
||||
# The AboveTustin repository has been cloned to this device.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'AboveTustin (reinstall)' '' OFF)
|
||||
else
|
||||
|
@ -562,7 +562,7 @@ if [[ -d "${RECEIVER_BUILD_DIRECTORY}/AboveTustin" ]] && [[ -d "${RECEIVER_BUILD
|
|||
fi
|
||||
else
|
||||
# The AboveTustin repository has not been cloned to this device.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'AboveTustin' '' OFF)
|
||||
else
|
||||
|
@ -577,7 +577,7 @@ fi
|
|||
# Check if the beast-splitter package is installed.
|
||||
if [[ $(dpkg-query -W -f='${STATUS}' beast-splitter 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
|
||||
# The beast-splitter package appears to not be installed.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'beast-splitter' '' OFF)
|
||||
else
|
||||
|
@ -589,7 +589,7 @@ if [[ $(dpkg-query -W -f='${STATUS}' beast-splitter 2>/dev/null | grep -c "ok in
|
|||
fi
|
||||
else
|
||||
# Offer the option to build then reinstall the beast-splitter package.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'beast-splitter (reinstall)' '' OFF)
|
||||
else
|
||||
|
@ -603,7 +603,7 @@ fi
|
|||
# Check if the Duck DNS update script exists.
|
||||
if [[ ! -f "${RECEIVER_BUILD_DIRECTORY}/duckdns/duck.sh" ]] ; then
|
||||
# Duck DNS does not appear to be set up on this device.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'Duck DNS Free Dynamic DNS Hosting' '' OFF)
|
||||
else
|
||||
|
@ -615,7 +615,7 @@ if [[ ! -f "${RECEIVER_BUILD_DIRECTORY}/duckdns/duck.sh" ]] ; then
|
|||
fi
|
||||
else
|
||||
# Offer the option to install/setup Duck DNS once more.
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Add this choice to the EXTRAS_LIST array to be used by the whiptail menu.
|
||||
EXTRAS_LIST=("${EXTRAS_LIST[@]}" 'Duck DNS Free Dynamic DNS Hosting (reinstall)' '' OFF)
|
||||
else
|
||||
|
@ -627,7 +627,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Display a menu the user can use to pick extras to be installed.
|
||||
if [[ -n "${EXTRAS_LIST}" ]] ; then
|
||||
# Display a checklist containing feeders that are not installed if any.
|
||||
|
@ -759,7 +759,7 @@ else
|
|||
CONFIRMATION="${CONFIRMATION}\n\n"
|
||||
fi
|
||||
|
||||
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
|
||||
if [[ ! "${RECEIVER_AUTOMATED_INSTALL}" = "true" ]] ; then
|
||||
# Ask for confirmation before moving on.
|
||||
CONFIRMATION="${CONFIRMATION}Do you wish to continue setup?"
|
||||
if ! (whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Confirm You Wish To Continue" --yesno "${CONFIRMATION}" 21 78) then
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2016 Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018 Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -75,4 +75,7 @@ EOF
|
|||
}
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
echo -e "\e[94m No core setup required...\e[97m"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2016 Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018 Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -59,7 +59,7 @@ echo -e ""
|
|||
## CONFIRM INSTALLED PACKAGES
|
||||
|
||||
if [[ -z "${DUMP1090_INSTALLED}" ]] || [[ -z "${DUMP1090_FORK}" ]] ; then
|
||||
echo -e "\e[95m Checking which dump1090 fork is installed...\e[97m"
|
||||
echo -e "\e[94m Checking which dump1090 fork is installed...\e[97m"
|
||||
if [[ $(dpkg-query -W -f='${STATUS}' dump1090-mutability 2>/dev/null | grep -c "ok installed") -eq 1 ]] ; then
|
||||
DUMP1090_FORK="mutability"
|
||||
DUMP1090_INSTALLED="true"
|
||||
|
@ -68,7 +68,6 @@ if [[ -z "${DUMP1090_INSTALLED}" ]] || [[ -z "${DUMP1090_FORK}" ]] ; then
|
|||
DUMP1090_FORK="fa"
|
||||
DUMP1090_INSTALLED="true"
|
||||
fi
|
||||
echo -e ""
|
||||
fi
|
||||
if [[ -f "/etc/init.d/rtlsdr-ogn" ]] ; then
|
||||
RTLSDROGN_INSTALLED="true"
|
||||
|
@ -90,12 +89,10 @@ if [[ "${DUMP1090_INSTALLED}" = "true" ]] && [[ "${DUMP1090_FORK}" = "mutability
|
|||
ChangeConfig "EXTRA_ARGS" "${RECEIVER_LONGITUDE}" "/etc/default/dump1090-mutability"
|
||||
|
||||
echo -e "\e[94m Reloading the systemd manager configuration...\e[97m"
|
||||
sudo systemctl daemon-reload 2>&1
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
echo -e "\e[94m Reloading dump1090-mutability...\e[97m"
|
||||
echo ""
|
||||
sudo service dump1090-mutability force-reload 2>&1
|
||||
echo ""
|
||||
sudo service dump1090-mutability force-reload
|
||||
fi
|
||||
|
||||
## BACKUP AND REPLACE COLLECTD.CONF
|
||||
|
@ -103,8 +100,7 @@ fi
|
|||
# Check if the collectd config file exists and if so back it up.
|
||||
if [[ -f "${COLLECTD_CONFIG}" ]] ; then
|
||||
echo -e "\e[94m Backing up the current collectd.conf file...\e[97m"
|
||||
sudo cp ${COLLECTD_CONFIG} ${COLLECTD_CONFIG}.bak 2>&1
|
||||
echo -e ""
|
||||
sudo cp ${COLLECTD_CONFIG} ${COLLECTD_CONFIG}.bak
|
||||
fi
|
||||
|
||||
# Generate new collectd config.
|
||||
|
@ -344,35 +340,29 @@ sudo tee -a ${COLLECTD_CONFIG} > /dev/null <<EOF
|
|||
Target "write"
|
||||
</Chain>
|
||||
EOF
|
||||
echo -e ""
|
||||
|
||||
## RELOAD COLLECTD
|
||||
|
||||
echo -e "\e[94m Reloading collectd so the new configuration is used...\e[97m"
|
||||
echo -e ""
|
||||
sudo service collectd force-reload
|
||||
echo -e ""
|
||||
|
||||
## EDIT CRONTAB
|
||||
|
||||
if [[ ! -x "${PORTAL_BUILD_DIRECTORY}/graphs/make-collectd-graphs.sh" ]] ; then
|
||||
echo -e "\e[94m Making the make-collectd-graphs.sh script executable...\e[97m"
|
||||
chmod +x ${PORTAL_BUILD_DIRECTORY}/graphs/make-collectd-graphs.sh 2>&1
|
||||
echo -e ""
|
||||
chmod +x ${PORTAL_BUILD_DIRECTORY}/graphs/make-collectd-graphs.sh
|
||||
fi
|
||||
|
||||
# The next block is temporary in order to insure this file is
|
||||
# deleted on older installation before the project renaming.
|
||||
if [[ -f "/etc/cron.d/adsb-feeder-performance-graphs" ]] ; then
|
||||
echo -e "\e[94m Removing outdated performance graphs cron file...\e[97m"
|
||||
sudo rm -f /etc/cron.d/adsb-feeder-performance-graphs 2>&1
|
||||
echo -e ""
|
||||
sudo rm -f /etc/cron.d/adsb-feeder-performance-graphs
|
||||
fi
|
||||
|
||||
if [[ -f "${COLLECTD_CRON_FILE}" ]] ; then
|
||||
echo -e "\e[94m Removing previously installed performance graphs cron file...\e[97m"
|
||||
sudo rm -f ${COLLECTD_CRON_FILE} 2>&1
|
||||
echo -e ""
|
||||
sudo rm -f ${COLLECTD_CRON_FILE}
|
||||
fi
|
||||
|
||||
echo -e "\e[94m Adding performance graphs cron file...\e[97m"
|
||||
|
@ -395,15 +385,17 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|||
6 * * * * root bash ${PORTAL_BUILD_DIRECTORY}/graphs/make-collectd-graphs.sh 30d >/dev/null 2>&1
|
||||
8 */12 * * * root bash ${PORTAL_BUILD_DIRECTORY}/graphs/make-collectd-graphs.sh 365d >/dev/null 2>&1
|
||||
EOF
|
||||
echo -e ""
|
||||
|
||||
# Update max_range.rrd to remove the 500 km / ~270 nmi limit.
|
||||
if [[ `rrdinfo ${DUMP1090_MAX_RANGE_RRD} | grep -c "ds\[value\].max = 1.0000000000e+06"` -eq 0 ]] ; then
|
||||
sudo rrdtool tune ${DUMP1090_MAX_RANGE_RRD} --maximum "value:1000000" 2>&1
|
||||
if [ -f "/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_range-max_range.rrd" ]; then
|
||||
if [[ `rrdinfo ${DUMP1090_MAX_RANGE_RRD} | grep -c "ds\[value\].max = 1.0000000000e+06"` -eq 0 ]] ; then
|
||||
echo -e "\e[94m Removing 500km/270mi limit from max_range.rrd...\e[97m"
|
||||
sudo rrdtool tune ${DUMP1090_MAX_RANGE_RRD} --maximum "value:1000000"
|
||||
fi
|
||||
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
|
||||
cd ${RECEIVER_ROOT_DIRECTORY}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# #
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
# #
|
||||
# Copyright (c) 2015-2016 Joseph A. Prochazka #
|
||||
# Copyright (c) 2015-2018 Joseph A. Prochazka #
|
||||
# #
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy #
|
||||
# of this software and associated documentation files (the "Software"), to deal #
|
||||
|
@ -293,8 +293,8 @@ fi
|
|||
|
||||
# Reload Lighttpd after installing the prerequisite packages.
|
||||
echo -e "\e[94m Reloading Lighttpd...\e[97m"
|
||||
echo -e ""
|
||||
sudo service lighttpd force-reload
|
||||
echo ""
|
||||
|
||||
## SETUP THE PORTAL WEBSITE
|
||||
|
||||
|
@ -410,11 +410,9 @@ fi
|
|||
# Reload or start Lighttpd.
|
||||
if pgrep "lighttpd" > /dev/null; then
|
||||
echo -e "\e[94m Reloading Lighttpd...\e[97m"
|
||||
echo -e ""
|
||||
sudo service lighttpd force-reload
|
||||
else
|
||||
echo -e "\e[94m Starting Lighttpd...\e[97m"
|
||||
echo -e ""
|
||||
sudo service lighttpd start
|
||||
fi
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ PROJECT_VERSION="2.6.0"
|
|||
RTLSDROGN_VERSION="0.2.5"
|
||||
|
||||
# FlightAware PiAware
|
||||
PIAWARE_VERSION="3.5.1"
|
||||
PIAWARE_VERSION="3.5.3"
|
||||
|
||||
# PlaneFinder Client
|
||||
PLANEFINDER_CLIENT_VERSION_ARM="3.7.20"
|
||||
PLANEFINDER_CLIENT_VERSION_ARM="3.7.40"
|
||||
PLANEFINDER_CLIENT_VERSION_I386="3.7.1"
|
||||
|
||||
# Flightradar24 Client
|
||||
|
|
Ładowanie…
Reference in New Issue