Removed unnecessary variables.

pull/355/head
jprochazka 2017-10-02 20:40:46 -04:00
rodzic b0b52ee918
commit 5818d1f6b0
8 zmienionych plików z 143 dodań i 194 usunięć

Wyświetl plik

@ -204,7 +204,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 ""
mv -vf ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/dump1090-mutability_*.deb ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/package-archive 2>&1
mv -vf ${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/dump1090-mutability_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
fi
fi

Wyświetl plik

@ -37,40 +37,11 @@ RECEIVER_ROOT_DIRECTORY="${PWD}"
RECEIVER_BASH_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/bash"
RECEIVER_BUILD_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/build"
# Component specific variables.
# Component service script variables.
### INCLUDE EXTERNAL SCRIPTS
source ${RECEIVER_BASH_DIRECTORY}/variables.sh
source ${RECEIVER_BASH_DIRECTORY}/functions.sh
# To be moved to functions.sh...
#################################################################################
# Blacklist DVB-T drivers for RTL-SDR devices.
function BlacklistModules () {
RECEIVER_KERNEL_MODULE_BLACKLIST="/etc/modprobe.d/rtlsdr-blacklist.conf"
if [[ ! -f "${RECEIVER_KERNEL_MODULE_BLACKLIST}" ]] || [[ `cat ${RECEIVER_KERNEL_MODULE_BLACKLIST} | wc -l` -lt 9 ]] ; then
echo -en "\e[94m Installing blacklist to prevent unwanted kernel modules from being loaded...\e[97m"
sudo tee ${RECEIVER_KERNEL_MODULE_BLACKLIST} > /dev/null <<EOF
blacklist dvb_usb_v2
blacklist dvb_usb_rtl28xxu
blacklist dvb_usb_rtl2830u
blacklist dvb_usb_rtl2832u
blacklist rtl_2830
blacklist rtl_2832
blacklist r820t
blacklist rtl2830
blacklist rtl2832
EOF
else
echo -en "\e[94m Kernel module blacklist already installed...\e[97m"
fi
}
## SET INSTALLATION VARIABLES
# Source the automated install configuration file if this is an automated installation.
@ -215,7 +186,6 @@ echo -e ""
# Create an RTL-SDR blacklist file so the device does not claim SDR's for other purposes.
BlacklistModules
CheckReturnCode
# Remove the dvb_usb_rtl28xxu kernel module.
echo -e "\e[94m Checking if the kernel module dvb_usb_rtl28xxu is loaded...\e[97m"
@ -286,10 +256,16 @@ if [[ -z "${RECEIVER_LATITUDE}" ]] && [[ -z "${RECEIVER_LONGITUDE}" ]] && [[ "${
fi
# Finally set the reciver's latitude and longitude if these variables were supplied.
if [[ -n "${RECEIVER_LATITUDE}" ]] && [[ -n "${RECEIVER_LONGITUDE}" ]] ; then
echo -e "\e[94m Setting the receiver's latitude to ${RECEIVER_LATITUDE}...\e[97m"
ChangeConfig "SiteLat" "${RECEIVER_LATITUDE}" "${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js"
echo -e "\e[94m Setting the receiver's longitude to ${RECEIVER_LONGITUDE}...\e[97m"
ChangeConfig "SiteLon" "${RECEIVER_LONGITUDE}" "${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js"
if [ -f ${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js ]; then
echo -e "\e[94m Setting the receiver's latitude in ${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js to ${RECEIVER_LATITUDE}...\e[97m"
ChangeConfig "SiteLat" "${RECEIVER_LATITUDE}" "${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js"
echo -e "\e[94m Setting the receiver's longitude in ${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js to ${RECEIVER_LONGITUDE}...\e[97m"
ChangeConfig "SiteLon" "${RECEIVER_LONGITUDE}" "${LIGHTTPD_DOCUMENT_ROOT_DIRECTORY}/dump978/config.js"
fi
echo -e "\e[94m Setting the receiver's latitude in ${RECEIVER_BUILD_DIRECTORY}/portal/html/dump978/config.js to ${RECEIVER_LATITUDE}...\e[97m"
ChangeConfig "SiteLat" "${RECEIVER_LATITUDE}" "${RECEIVER_BUILD_DIRECTORY}/portal/html/dump978/config.js"
echo -e "\e[94m Setting the receiver's longitude in ${RECEIVER_BUILD_DIRECTORY}/portal/html/dump978/config.js to ${RECEIVER_LONGITUDE}...\e[97m"
ChangeConfig "SiteLon" "${RECEIVER_LONGITUDE}" "${RECEIVER_BUILD_DIRECTORY}/portal/html/dump978/config.js"
fi
# Create the dump978 JSON directory in Lighttpd's document root.

2
bash/decoders/rtlsdr-ogn.sh 100644 → 100755
Wyświetl plik

@ -125,7 +125,7 @@ CheckPackage libcurl3
CheckPackage libfftw3-3
CheckPackage libfftw3-dev
CheckPackage libjpeg62-turbo
CheckPackage libjpeg8
CheckPackage libjpeg
CheckPackage libjpeg-dev
CheckPackage lynx
CheckPackage procserv

Wyświetl plik

@ -37,17 +37,6 @@ RECEIVER_ROOT_DIRECTORY="${PWD}"
RECEIVER_BASH_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/bash"
RECEIVER_BUILD_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/build"
# Component specific variables.
COMPONENT_NAME="FlightRadar24 feeder client"
COMPONENT_PROVIDER="FlightRadar24"
COMPONENT_PACKAGE_NAME="fr24feed"
COMPONENT_WEBSITE="https://www.flightradar24.com/share-your-data"
COMPONENT_GITHUB_URL=""
COMPONENT_BUILD_DIRECTORY="${RECEIVER_BUILD_DIRECTORY}/flightradar24"
# Component service script variables.
COMPONENT_SERVICE_NAME="fr24feed"
### INCLUDE EXTERNAL SCRIPTS
source ${RECEIVER_BASH_DIRECTORY}/variables.sh
@ -67,27 +56,27 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
echo -e "\n\e[91m ${RECEIVER_PROJECT_TITLE}"
fi
echo -e ""
echo -e "\e[92m Setting up ${COMPONENT_NAME}..."
echo -e "\e[92m Setting up FlightRadar24 feeder client..."
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
echo -e ""
# Check for existing component install.
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' fr24feed 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
COMPONENT_FIRST_INSTALL="true"
fi
# Confirm component installation.
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
# Interactive install.
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${COMPONENT_NAME} Setup" --yesno "The ${COMPONENT_NAME} takes data from a local dump1090 instance and shares this with ${COMPONENT_PROVIDER} using the ${COMPONENT_PACKAGE_NAME} package, for more information please see their website:\n\n ${COMPONENT_WEBSITE}\n\nContinue setup by installing the ${COMPONENT_NAME}?" 13 78 3>&1 1>&2 2>&3)
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "FlightRadar24 feeder client Setup" --yesno "The FlightRadar24 feeder client takes data from a local dump1090 instance and shares this with FlightRadar24 using the fr24feed package, for more information please see their website:\n\n https://www.flightradar24.com/share-your-data\n\nContinue setup by installing the FlightRadar24 feeder client?" 13 78 3>&1 1>&2 2>&3)
if [[ ${CONTINUE_SETUP} -eq 1 ]] ; then
# Setup has been halted by the user.
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 ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m FlightRadar24 feeder client setup halted.\e[39m"
echo -e ""
read -p "Press enter to continue..." CONTINUE
exit 1
@ -101,7 +90,7 @@ fi
### CHECK FOR PREREQUISITE PACKAGES
echo -e "\e[95m Installing packages needed to fulfill dependencies for ${COMPONENT_NAME}...\e[97m"
echo -e "\e[95m Installing packages needed to fulfill dependencies for FlightRadar24 feeder client...\e[97m"
echo -e ""
if [[ "${CPU_ARCHITECTURE}" = "x86_64" ]] ; then
@ -131,33 +120,35 @@ CheckPackage dirmngr
### STOP ANY RUNNING SERVICES
# Attempt to stop using systemd.
if [[ "`sudo systemctl status ${COMPONENT_SERVICE_NAME} 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Stopping the ${COMPONENT_NAME} service...\e[97m"
sudo systemctl stop ${COMPONENT_SERVICE_NAME} 2>&1
if [[ "`sudo systemctl status fr24feed 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Stopping the FlightRadar24 feeder client service...\e[97m"
sudo systemctl stop fr24feed 2>&1
fi
### START INSTALLATION
echo -e ""
echo -e "\e[95m Begining the ${COMPONENT_NAME} installation process...\e[97m"
echo -e "\e[95m Begining the FlightRadar24 feeder client installation process...\e[97m"
echo -e ""
# Create the component build directory if it does not exist.
if [[ ! -d "${COMPONENT_BUILD_DIRECTORY}" ]] ; then
echo -e "\e[94m Creating the ${COMPONENT_NAME} build directory...\e[97m"
mkdir -vp ${COMPONENT_BUILD_DIRECTORY}
if [[ ! -d ${RECEIVER_BUILD_DIRECTORY}/flightradar24 ]] ; then
echo -e "\e[94m Creating the FlightRadar24 feeder client build directory...\e[97m"
echo ""
mkdir -vp ${RECEIVER_BUILD_DIRECTORY}/flightradar24
echo ""
fi
# Change to the component build directory.
if [[ ! "${PWD}" = "${COMPONENT_BUILD_DIRECTORY}" ]] ; then
echo -e "\e[94m Entering the ${COMPONENT_NAME} build directory...\e[97m"
cd ${COMPONENT_BUILD_DIRECTORY} 2>&1
if [[ ! ${PWD} = ${RECEIVER_BUILD_DIRECTORY}/flightradar24 ]] ; then
echo -e "\e[94m Entering the FlightRadar24 feeder client build directory...\e[97m"
cd ${RECEIVER_BUILD_DIRECTORY}/flightradar24 2>&1
fi
## BUILD AND INSTALL THE COMPONENT PACKAGE
echo -e ""
echo -e "\e[95m Building and installing the ${COMPONENT_NAME} package...\e[97m"
echo -e "\e[95m Building and installing the FlightRadar24 feeder client package...\e[97m"
echo -e ""
## DOWNLOAD OR UPDATE THE COMPONENT SOURCE
@ -165,43 +156,37 @@ echo -e ""
# Download the appropriate package depending on the devices architecture.
if [[ "${CPU_ARCHITECTURE}" = "armv7l" ]] || [[ "${CPU_ARCHITECTURE}" = "armv6l" ]] || [[ "${CPU_ARCHITECTURE}" = "aarch64" ]] ; then
# ARM achitecture detected.
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${COMPONENT_NAME} setup instructions" --msgbox "This script will now download and execute the official ${COMPONENT_NAME} setup script, please follow the instructions provided and supply the required information when ask for by the script.\n\nOnce finished the ADS-B Receiver Project scripts will continue." 11 78
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "FlightRadar24 feeder client setup instructions" --msgbox "This script will now download and execute the official FlightRadar24 feeder client setup script, please follow the instructions provided and supply the required information when ask for by the script.\n\nOnce finished the ADS-B Receiver Project scripts will continue." 11 78
echo -e "\e[94m Downloading the ${COMPONENT_NAME} installation script for ARM...\e[97m"
echo -e "\e[94m Downloading the FlightRadar24 feeder client installation script for ARM...\e[97m"
echo -e ""
wget --no-check-certificate https://repo.feed.flightradar24.com/install_fr24_rpi.sh -O ${COMPONENT_BUILD_DIRECTORY}/install_fr24_rpi.sh
wget --no-check-certificate https://repo.feed.flightradar24.com/install_fr24_rpi.sh -O ${RECEIVER_BUILD_DIRECTORY}/flightradar24/install_fr24_rpi.sh
else
# Otherwise assume i386.
echo -e "\e[94m Downloading the ${COMPONENT_NAME} v${FLIGHTRADAR24_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e "\e[94m Downloading the FlightRadar24 feeder client v${FLIGHTRADAR24_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e ""
wget --no-check-certificate https://feed.flightradar24.com/linux/${COMPONENT_PACKAGE_NAME}_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb -O ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb
wget --no-check-certificate https://feed.flightradar24.com/linux/fr24feed_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb -O ${RECEIVER_BUILD_DIRECTORY}/flightradar24/fr24feed_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb
fi
## INSTALL THE COMPONENT PACKAGE
# Dummy test for consistency with other feeder install scripts.
if [[ -n "${COMPONENT_NAME}" ]] ; then
echo -e "\e[94m Installing the ${COMPONENT_NAME} package...\e[97m"
echo -e ""
fi
# Install the proper package depending on the devices architecture.
if [[ "${CPU_ARCHITECTURE}" = "armv7l" ]] || [[ "${CPU_ARCHITECTURE}" = "armv6l" ]] || [[ "${CPU_ARCHITECTURE}" = "aarch64" ]] ; then
# ARM achitecture detected.
echo -e "\e[94m Executing the ${COMPONENT_NAME} installation script...\e[97m"
echo -e "\e[94m Executing the FlightRadar24 feeder client installation script...\e[97m"
echo -e ""
sudo bash ${COMPONENT_BUILD_DIRECTORY}/install_fr24_rpi.sh
sudo bash ${RECEIVER_BUILD_DIRECTORY}/flightradar24/install_fr24_rpi.sh
else
# Otherwise assume i386.
echo -e "\e[94m Installing the ${COMPONENT_NAME} v${FLIGHTRADAR24_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e "\e[94m Installing the FlightRadar24 feeder client v${FLIGHTRADAR24_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
if [[ `lsb_release -si` = "Debian" ]] ; then
# Force architecture if this is Debian.
echo -e "\e[94m NOTE: dpkg executed with added flag --force-architecture.\e[97m"
echo -e ""
sudo dpkg -i --force-architecture ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb 2>&1
sudo dpkg -i --force-architecture ${RECEIVER_BUILD_DIRECTORY}/flightradar24/fr24feed_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb 2>&1
else
echo -e ""
sudo dpkg -i ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb 2>&1
sudo dpkg -i ${RECEIVER_BUILD_DIRECTORY}/flightradar24/fr24feed_${FLIGHTRADAR24_CLIENT_VERSION_I386}_i386.deb 2>&1
fi
fi
@ -209,20 +194,19 @@ fi
if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
# Check that the component package was installed successfully.
echo -e ""
echo -e "\e[94m Checking that the ${COMPONENT_NAME} package was installed properly...\e[97m"
echo -e ""
echo -e "\e[94m Checking that the FlightRadar24 feeder client package was installed properly...\e[97m"
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' fr24feed 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
# If the component package could not be installed halt setup.
echo -e ""
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
echo -e " UNABLE TO INSTALL A REQUIRED PACKAGE."
echo -e " SETUP HAS BEEN TERMINATED!"
echo -e ""
echo -e "\e[93mThe package \"${COMPONENT_PACKAGE_NAME}\" could not be installed.\e[39m"
echo -e "\e[93mThe package \"fr24feed\" could not be installed.\e[39m"
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m FlightRadar24 feeder client setup halted.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE
@ -238,9 +222,9 @@ if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
fi
# Archive binary package.
echo -e "\e[94m Moving the ${COMPONENT_NAME} binary package into the archive directory...\e[97m"
echo -e "\e[94m Moving the FlightRadar24 feeder client binary package into the archive directory...\e[97m"
echo -e ""
mv -vf ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
mv -vf ${RECEIVER_BUILD_DIRECTORY}/flightradar24/fr24feed_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
echo -e ""
## COMPONENT POST INSTALL ACTIONS
@ -248,27 +232,24 @@ if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
# Check for component first install
if [[ "${COMPONENT_FIRST_INSTALL}" = "true" ]] ; then
# Run signup script if first install.
echo -e "\e[94m Starting ${COMPONENT_PACKAGE_NAME} signup wizard...\e[97m"
echo -e "\e[94m Starting fr24feed signup wizard...\e[97m"
echo -e ""
${COMPONENT_PACKAGE_NAME} --signup
sudo fr24feed --signup
echo -e ""
fi
# Update config file permissions
echo -e "\e[94m Updating configuration file permissions...\e[97m"
echo -e ""
sudo chmod a+rw /etc/fr24feed.ini 2>&1
echo -e ""
# (re)start the component service.
if [[ "`sudo systemctl status ${COMPONENT_SERVICE_NAME} 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Restarting the ${COMPONENT_NAME} service...\e[97m"
sudo systemctl restart ${COMPONENT_SERVICE_NAME} 2>&1
if [[ "`sudo systemctl status fr24feed 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Restarting the FlightRadar24 feeder client service...\e[97m"
sudo systemctl restart fr24feed 2>&1
else
echo -e "\e[94m Starting the ${COMPONENT_NAME} service...\e[97m"
sudo systemctl start ${COMPONENT_SERVICE_NAME} 2>&1
echo -e "\e[94m Starting the FlightRadar24 feeder client service...\e[97m"
sudo systemctl start fr24feed 2>&1
fi
echo -e ""
fi
fi
@ -280,7 +261,7 @@ cd ${RECEIVER_ROOT_DIRECTORY} 2>&1
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup is complete.\e[39m"
echo -e "\e[92m FlightRadar24 feeder client setup is complete.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE

Wyświetl plik

@ -37,17 +37,6 @@ RECEIVER_ROOT_DIRECTORY="${PWD}"
RECEIVER_BASH_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/bash"
RECEIVER_BUILD_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/build"
# Component specific variables.
COMPONENT_NAME="FlightAware PiAware client"
COMPONENT_PROVIDER="FlightAware"
COMPONENT_PACKAGE_NAME="piaware"
COMPONENT_WEBSITE="https://www.flightaware.com/adsb/piaware/"
COMPONENT_GITHUB_URL="https://github.com/flightaware/piaware_builder.git"
COMPONENT_BUILD_DIRECTORY="${RECEIVER_BUILD_DIRECTORY}/piaware_builder"
# Component service script variables.
COMPONENT_SERVICE_NAME="piaware"
### INCLUDE EXTERNAL SCRIPTS
source ${RECEIVER_BASH_DIRECTORY}/variables.sh
@ -67,27 +56,27 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
echo -e "\n\e[91m ${RECEIVER_PROJECT_TITLE}"
fi
echo -e ""
echo -e "\e[92m Setting up ${COMPONENT_NAME}..."
echo -e "\e[92m Setting up FlightAware PiAware client..."
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
echo -e ""
# Check for existing component install.
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' piaware 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
COMPONENT_FIRST_INSTALL="true"
fi
# Confirm component installation.
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
# Interactive install.
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${COMPONENT_NAME} Setup" --yesno "The ${COMPONENT_NAME} takes data from a local dump1090 instance and shares this with ${COMPONENT_PROVIDER} using the ${COMPONENT_PACKAGE_NAME} package, for more information please see their website:\n\n ${COMPONENT_WEBSITE}\n\nContinue setup by installing the ${COMPONENT_NAME}?" 13 78 3>&1 1>&2 2>&3)
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "FlightAware PiAware client Setup" --yesno "The FlightAware PiAware client takes data from a local dump1090 instance and shares this with FlightAware using the piaware package, for more information please see their website:\n\n https://www.flightaware.com/adsb/piaware/\n\nContinue setup by installing the FlightAware PiAware client?" 13 78 3>&1 1>&2 2>&3)
if [[ ${CONTINUE_SETUP} -eq 1 ]] ; then
# Setup has been halted by the user.
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 ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m FlightAware PiAware client setup halted.\e[39m"
echo -e ""
read -p "Press enter to continue..." CONTINUE
exit 1
@ -101,13 +90,10 @@ fi
### CHECK FOR PREREQUISITE PACKAGES
echo -e "\e[95m Installing packages needed to fulfill dependencies for ${COMPONENT_NAME}...\e[97m"
echo -e "\e[95m Installing packages needed to fulfill dependencies for FlightAware PiAware client...\e[97m"
echo -e ""
# Required by install script.
CheckPackage git
CheckPackage build-essential
# Required by component.
CheckPackage debhelper
CheckPackage tcl8.6-dev
CheckPackage autoconf
@ -120,25 +106,26 @@ CheckPackage tclx8.4
CheckPackage tcllib
CheckPackage tcl-tls
CheckPackage itcl3
CheckPackage net-tools
### STOP ANY RUNNING SERVICES
# Attempt to stop using systemd.
if [[ "`sudo systemctl status ${COMPONENT_SERVICE_NAME} 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Stopping the ${COMPONENT_NAME} service...\e[97m"
sudo systemctl stop ${COMPONENT_SERVICE_NAME} 2>&1
if [[ "`sudo systemctl status piaware 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then
echo -e "\e[94m Stopping the FlightAware PiAware client service...\e[97m"
sudo systemctl stop piaware 2>&1
fi
### START INSTALLATION
echo -e ""
echo -e "\e[95m Begining the ${COMPONENT_NAME} installation process...\e[97m"
echo -e "\e[95m Begining the FlightAware PiAware client installation process...\e[97m"
echo -e ""
if [[ -d "${COMPONENT_BUILD_DIRECTORY}" ]] && [[ -d "${COMPONENT_BUILD_DIRECTORY}/.git" ]] ; then
if [[ -d ${RECEIVER_BUILD_DIRECTORY}/piaware_builder ]] && [[ -d ${RECEIVER_BUILD_DIRECTORY}/piaware_builder/.git ]] ; then
# A directory with a git repository containing the source code already exists.
echo -e "\e[94m Entering the piaware_builder git repository directory...\e[97m"
cd ${COMPONENT_BUILD_DIRECTORY} 2>&1
cd ${RECEIVER_BUILD_DIRECTORY}/piaware_builder 2>&1
echo -e "\e[94m Updating the local piaware_builder git repository...\e[97m"
echo -e ""
git pull 2>&1
@ -148,62 +135,60 @@ else
cd ${RECEIVER_BUILD_DIRECTORY} 2>&1
echo -e "\e[94m Cloning the piaware_builder git repository locally...\e[97m"
echo -e ""
git clone ${COMPONENT_GITHUB_URL} 2>&1
git clone https://github.com/flightaware/piaware_builder.git 2>&1
fi
## BUILD AND INSTALL THE COMPONENT PACKAGE
echo -e ""
echo -e "\e[95m Building and installing the ${COMPONENT_NAME} package...\e[97m"
echo -e "\e[95m Building and installing the FlightAware PiAware client package...\e[97m"
echo -e ""
# Change to the component build directory.
if [[ ! "${PWD}" = "${COMPONENT_BUILD_DIRECTORY}" ]] ; then
if [[ ! ${PWD} = ${RECEIVER_BUILD_DIRECTORY}/piaware_builder ]] ; then
echo -e "\e[94m Entering the piaware_builder git repository directory...\e[97m"
cd ${COMPONENT_BUILD_DIRECTORY} 2>&1
cd ${RECEIVER_BUILD_DIRECTORY}/piaware_builder 2>&1
fi
# Dummy test for consistency with other feeder install scripts.
if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
# Execute build script.
echo -e "\e[94m Executing the ${COMPONENT_NAME} build script...\e[97m"
echo -e "\e[94m Executing the FlightAware PiAware client build script...\e[97m"
echo -e ""
./sensible-build.sh jessie
echo -e ""
# Change to build script directory.
echo -e "\e[94m Entering the ${COMPONENT_NAME} build directory...\e[97m"
cd ${COMPONENT_BUILD_DIRECTORY}/package-jessie 2>&1
echo -e "\e[94m Entering the FlightAware PiAware client build directory...\e[97m"
cd ${RECEIVER_BUILD_DIRECTORY}/piaware_builder/package-jessie 2>&1
echo -e ""
# Build binary package.
echo -e "\e[94m Building the ${COMPONENT_NAME} package...\e[97m"
echo -e "\e[94m Building the FlightAware PiAware client package...\e[97m"
echo -e ""
dpkg-buildpackage -b 2>&1
echo -e ""
# Install binary package.
echo -e "\e[94m Installing the ${COMPONENT_NAME} package...\e[97m"
echo -e "\e[94m Installing the FlightAware PiAware client package...\e[97m"
echo -e ""
sudo dpkg -i ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_*.deb 2>&1
sudo dpkg -i ${RECEIVER_BUILD_DIRECTORY}/piaware_builder/piaware_*.deb 2>&1
echo -e ""
# Check that the component package was installed successfully.
echo -e ""
echo -e "\e[94m Checking that the ${COMPONENT_NAME} package was installed properly...\e[97m"
echo -e ""
echo -e "\e[94m Checking that the FlightAware PiAware client package was installed properly...\e[97m"
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' piaware 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
# If the component package could not be installed halt setup.
echo -e ""
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
echo -e " UNABLE TO INSTALL A REQUIRED PACKAGE."
echo -e " SETUP HAS BEEN TERMINATED!"
echo -e ""
echo -e "\e[93mThe package \"${COMPONENT_PACKAGE_NAME}\" could not be installed.\e[39m"
echo -e "\e[93mThe package \"piaware\" could not be installed.\e[39m"
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m FlightAware PiAware client setup halted.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE
@ -219,15 +204,15 @@ if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
fi
# Archive binary package.
echo -e "\e[94m Moving the ${COMPONENT_NAME} binary package into the archive directory...\e[97m"
echo -e "\e[94m Moving the FlightAware PiAware client binary package into the archive directory...\e[97m"
echo -e ""
mv -vf ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
mv -vf ${RECEIVER_BUILD_DIRECTORY}/piaware_builder/piaware_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
echo -e ""
# Archive changelog.
echo -e "\e[94m Moving the ${COMPONENT_NAME} changes file into the archive directory...\e[97m"
echo -e "\e[94m Moving the FlightAware PiAware client changes file into the archive directory...\e[97m"
echo -e ""
mv -vf ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_*.changes ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
mv -vf ${RECEIVER_BUILD_DIRECTORY}/piaware_builder/piaware_*.changes ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
echo -e ""
fi
fi
@ -235,7 +220,7 @@ fi
## COMPONENT POST INSTALL ACTIONS
# Instruct the user as to how they can claim their receiver online.
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Claiming Your PiAware Device" --yesno "FlightAware now requires you claim your feeder online using the following page:\n\n http://flightaware.com/adsb/piaware/claim\n\nTo claim your device simply visit the address listed above to complete the process." 16 78
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "Claiming Your PiAware Device" --yesno "FlightAware now requires you claim your feeder online using the following page:\n\n http://flightaware.com/adsb/piaware/claim\n\nTo claim your device simply visit the address listed above." 16 78
### SETUP COMPLETE
@ -245,7 +230,7 @@ cd ${RECEIVER_ROOT_DIRECTORY} 2>&1
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup is complete.\e[39m"
echo -e "\e[92m FlightAware PiAware client setup is complete.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE

Wyświetl plik

@ -37,17 +37,6 @@ RECEIVER_ROOT_DIRECTORY="${PWD}"
RECEIVER_BASH_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/bash"
RECEIVER_BUILD_DIRECTORY="${RECEIVER_ROOT_DIRECTORY}/build"
# Component specific variables.
COMPONENT_NAME="PlaneFinder ADS-B Client"
COMPONENT_PROVIDER="PlaneFinder"
COMPONENT_PACKAGE_NAME="pfclient"
COMPONENT_WEBSITE="https://planefinder.net/sharing/client"
COMPONENT_GITHUB_URL=""
COMPONENT_BUILD_DIRECTORY="${RECEIVER_BUILD_DIRECTORY}/planefinder"
RECEIVER_IP_ADDRESS=`ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'`
# Component service script variables.
### INCLUDE EXTERNAL SCRIPTS
source ${RECEIVER_BASH_DIRECTORY}/variables.sh
@ -67,41 +56,41 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
echo -e "\n\e[91m ${RECEIVER_PROJECT_TITLE}"
fi
echo -e ""
echo -e "\e[92m Setting up ${COMPONENT_NAME}..."
echo -e "\e[92m Setting up PlaneFinder ADS-B Client..."
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------\e[96m"
echo -e ""
# Check for existing component install.
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' pfclient 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
COMPONENT_FIRST_INSTALL="true"
fi
# Confirm component installation.
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
# Interactive install.
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${COMPONENT_NAME} Setup" --yesno "The ${COMPONENT_NAME} is an easy and accurate way to share your ADS-B and MLAT data with Plane Finder. It comes with a beautiful user interface that helps you explore and interact with your data in realtime.\n\n ${COMPONENT_WEBSITE}\n\nContinue setup by installing ${COMPONENT_NAME}?" 13 78 3>&1 1>&2 2>&3)
CONTINUE_SETUP=$(whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "PlaneFinder ADS-B Client Setup" --yesno "The PlaneFinder ADS-B Client is an easy and accurate way to share your ADS-B and MLAT data with Plane Finder. It comes with a beautiful user interface that helps you explore and interact with your data in realtime.\n\n https://planefinder.net/sharing/client\n\nContinue setup by installing PlaneFinder ADS-B Client?" 13 78 3>&1 1>&2 2>&3)
if [[ ${CONTINUE_SETUP} -eq 1 ]] ; then
# Setup has been halted by the user.
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 ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m PlaneFinder ADS-B Client setup halted.\e[39m"
echo -e ""
read -p "Press enter to continue..." CONTINUE
exit 1
fi
else
# Warn that automated installation is not supported.
echo -e "\e[92m Automated installation of ${COMPONENT_NAME} is not yet supported...\e[39m"
echo -e "\e[92m Automated installation of PlaneFinder ADS-B Client is not yet supported...\e[39m"
echo -e ""
exit 1
fi
### CHECK FOR PREREQUISITE PACKAGES
echo -e "\e[95m Installing packages needed to fulfill dependencies for ${COMPONENT_NAME}...\e[97m"
echo -e "\e[95m Installing packages needed to fulfill dependencies for PlaneFinder ADS-B Client...\e[97m"
echo -e ""
if [[ "${CPU_ARCHITECTURE}" = "x86_64" ]] ; then
@ -124,25 +113,26 @@ CheckPackage wget
### START INSTALLATION
echo -e ""
echo -e "\e[95m Begining the ${COMPONENT_NAME} installation process...\e[97m"
echo -e "\e[95m Begining the PlaneFinder ADS-B Client installation process...\e[97m"
echo -e ""
# Create the component build directory if it does not exist.
if [[ ! -d "${COMPONENT_BUILD_DIRECTORY}" ]] ; then
echo -e "\e[94m Creating the ${COMPONENT_NAME} build directory...\e[97m"
mkdir -vp ${COMPONENT_BUILD_DIRECTORY}
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
fi
# Change to the component build directory.
if [[ ! "${PWD}" = "${COMPONENT_BUILD_DIRECTORY}" ]] ; then
echo -e "\e[94m Entering the ${COMPONENT_NAME} build directory...\e[97m"
cd ${COMPONENT_BUILD_DIRECTORY} 2>&1
if [[ ! ${PWD} = ${RECEIVER_BUILD_DIRECTORY}/planefinder ]] ; then
echo -e "\e[94m Entering the PlaneFinder ADS-B Client build directory...\e[97m"
cd ${RECEIVER_BUILD_DIRECTORY}/planefinder 2>&1
fi
## BUILD AND INSTALL THE COMPONENT PACKAGE
echo -e ""
echo -e "\e[95m Building and installing the ${COMPONENT_NAME} package...\e[97m"
echo -e "\e[95m Building and installing the PlaneFinder ADS-B Client package...\e[97m"
echo -e ""
## DOWNLOAD OR UPDATE THE COMPONENT SOURCE
@ -150,41 +140,35 @@ echo -e ""
# Download the appropriate package depending on the devices architecture.
if [[ "${CPU_ARCHITECTURE}" = "armv7l" ]] || [[ "${CPU_ARCHITECTURE}" = "armv6l" ]] ; then
# ARM achitecture detected.
echo -e "\e[94m Downloading the ${COMPONENT_NAME} v${PLANEFINDER_CLIENT_VERSION_ARM} package for ARM devices...\e[97m"
echo -e "\e[94m Downloading the PlaneFinder ADS-B Client v${PLANEFINDER_CLIENT_VERSION_ARM} package for ARM devices...\e[97m"
echo -e ""
wget --no-check-certificate https://client.planefinder.net/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb -O ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb
wget --no-check-certificate https://client.planefinder.net/pfclient_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb -O ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb
else
# Otherwise assume i386.
echo -e "\e[94m Downloading the ${COMPONENT_NAME} v${PLANEFINDER_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e "\e[94m Downloading the PlaneFinder ADS-B Client v${PLANEFINDER_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e ""
wget --no-check-certificate https://client.planefinder.net/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb -O ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb
wget --no-check-certificate https://client.planefinder.net/pfclient_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb -O ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb
fi
## INSTALL THE COMPONENT PACKAGE
# Dummy test for consistency with other feeder install scripts.
if [[ -n "${COMPONENT_NAME}" ]] ; then
echo -e "\e[94m Installing the ${COMPONENT_NAME} package...\e[97m"
echo -e ""
fi
# Install the proper package depending on the devices architecture.
if [[ "${CPU_ARCHITECTURE}" = "armv7l" ]] || [[ "${CPU_ARCHITECTURE}" = "armv6l" ]] || [[ "${CPU_ARCHITECTURE}" = "aarch64" ]] ; then
# ARM achitecture detected.
echo -e "\e[94m Installing the ${COMPONENT_NAME} v${PLANEFINDER_CLIENT_VERSION_ARM} package for ARM devices...\e[97m"
echo -e "\e[94m Installing the PlaneFinder ADS-B Client v${PLANEFINDER_CLIENT_VERSION_ARM} package for ARM devices...\e[97m"
echo -e ""
sudo dpkg -i ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb 2>&1
sudo dpkg -i ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_${PLANEFINDER_CLIENT_VERSION_ARM}_armhf.deb 2>&1
else
# Otherwise assume i386.
echo -e "\e[94m Installing the ${COMPONENT_NAME} v${PLANEFINDER_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
echo -e "\e[94m Installing the PlaneFinder ADS-B Client v${PLANEFINDER_CLIENT_VERSION_I386} package for i386 devices...\e[97m"
if [[ `lsb_release -si` = "Debian" ]] ; then
# Force architecture if this is Debian.
echo -e "\e[94m NOTE: dpkg executed with added flag --force-architecture.\e[97m"
echo -e ""
sudo dpkg -i --force-architecture ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb 2>&1
sudo dpkg -i --force-architecture ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb 2>&1
else
echo -e ""
sudo dpkg -i ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb 2>&1
sudo dpkg -i ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_${PLANEFINDER_CLIENT_VERSION_I386}_i386.deb 2>&1
fi
fi
@ -192,20 +176,19 @@ fi
if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
# Check that the component package was installed successfully.
echo -e ""
echo -e "\e[94m Checking that the ${COMPONENT_NAME} package was installed properly...\e[97m"
echo -e ""
echo -e "\e[94m Checking that the PlaneFinder ADS-B Client package was installed properly...\e[97m"
if [[ $(dpkg-query -W -f='${STATUS}' ${COMPONENT_PACKAGE_NAME} 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
if [[ $(dpkg-query -W -f='${STATUS}' pfclient 2>/dev/null | grep -c "ok installed") -eq 0 ]] ; then
# If the component package could not be installed halt setup.
echo -e ""
echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m"
echo -e " UNABLE TO INSTALL A REQUIRED PACKAGE."
echo -e " SETUP HAS BEEN TERMINATED!"
echo -e ""
echo -e "\e[93mThe package \"${COMPONENT_PACKAGE_NAME}\" could not be installed.\e[39m"
echo -e "\e[93mThe package \"pfclient\" could not be installed.\e[39m"
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup halted.\e[39m"
echo -e "\e[92m PlaneFinder ADS-B Client setup halted.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE
@ -221,9 +204,9 @@ if [[ -n "${CPU_ARCHITECTURE}" ]] ; then
fi
# Archive binary package.
echo -e "\e[94m Moving the ${COMPONENT_NAME} binary package into the archive directory...\e[97m"
echo -e "\e[94m Moving the PlaneFinder ADS-B Client binary package into the archive directory...\e[97m"
echo -e ""
mv -vf ${COMPONENT_BUILD_DIRECTORY}/${COMPONENT_PACKAGE_NAME}_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
mv -vf ${RECEIVER_BUILD_DIRECTORY}/planefinder/pfclient_*.deb ${RECEIVER_BUILD_DIRECTORY}/package-archive 2>&1
echo -e ""
fi
fi
@ -231,7 +214,8 @@ fi
## COMPONENT POST INSTALL ACTIONS
# Display final setup instructions which cannot be handled by this script.
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "${COMPONENT_NAME} Setup Instructions" --msgbox "At this point the ${COMPONENT_NAME} should be installed and running; however this script is only capable of installing the ${COMPONENT_NAME}. There are stilla few steps left which you must manually do through the ${COMPONENT_NAME} at the following URL:\n\n http://${RECEIVER_IP_ADDRESS}:30053\n\nThe follow the instructions supplied by the ${COMPONENT_NAME}.\n\nUse the following settings when asked for them.\n\nData Format: Beast\nTcp Address: 127.0.0.1\nTcp Port: 30005" 20 78
RECEIVER_IP_ADDRESS=`ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/'`
whiptail --backtitle "${RECEIVER_PROJECT_TITLE}" --title "PlaneFinder ADS-B Client Setup Instructions" --msgbox "At this point the PlaneFinder ADS-B Client should be installed and running; however this script is only capable of installing the PlaneFinder ADS-B Client. There are still a few steps left which you must manually do through the PlaneFinder ADS-B Client at the following URL:\n\n http://${RECEIVER_IP_ADDRESS}:30053\n\nThe follow the instructions supplied by the PlaneFinder ADS-B Client.\n\nUse the following settings when asked for them.\n\nData Format: Beast\nTcp Address: 127.0.0.1\nTcp Port: 30005" 20 78
### SETUP COMPLETE
@ -241,7 +225,7 @@ cd ${RECEIVER_ROOT_DIRECTORY} 2>&1
echo -e ""
echo -e "\e[93m ------------------------------------------------------------------------------"
echo -e "\e[92m ${COMPONENT_NAME} setup is complete.\e[39m"
echo -e "\e[92m PlaneFinder ADS-B Client setup is complete.\e[39m"
echo -e ""
if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
read -p "Press enter to continue..." CONTINUE

Wyświetl plik

@ -158,3 +158,26 @@ function Check_Hardware () {
export HARDWARE_REVISION=`grep "^Revision" /proc/cpuinfo | awk '{print $3}'`
fi
}
#################################################################################
# Blacklist DVB-T drivers for RTL-SDR devices.
function BlacklistModules {
if [[ ! -f /etc/modprobe.d/rtlsdr-blacklist.conf ]] || [[ `cat /etc/modprobe.d/rtlsdr-blacklist.conf | wc -l` -lt 9 ]] ; then
echo -en "\e[94m Installing blacklist to prevent unwanted kernel modules from being loaded...\e[97m"
sudo tee ${RECEIVER_KERNEL_MODULE_BLACKLIST} > /dev/null <<EOF
blacklist dvb_usb_v2
blacklist dvb_usb_rtl28xxu
blacklist dvb_usb_rtl2830u
blacklist dvb_usb_rtl2832u
blacklist rtl_2830
blacklist rtl_2832
blacklist r820t
blacklist rtl2830
blacklist rtl2832
EOF
else
echo -en "\e[94m Kernel module blacklist already installed...\e[97m"
fi
}

Wyświetl plik

@ -335,7 +335,7 @@ if [[ -f "/etc/init.d/rtlsdr-ogn" ]] ; then
RTLSDROGN_DO_UPGRADE="false"
fi
fi
fi
fi
else
# The RTL-SDR OGN binaries do not appear to exist on this device.
RTLSDROGN_IS_INSTALLED="false"