From 990ced4c77b49da980709449e0703c5914a89672 Mon Sep 17 00:00:00 2001 From: Joe Prochazka Date: Wed, 28 Feb 2018 21:41:10 -0500 Subject: [PATCH] Took out redundant lines. --- bash/decoders/dump1090-mutability.sh | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/bash/decoders/dump1090-mutability.sh b/bash/decoders/dump1090-mutability.sh index 2bfd0bf5..f121df2d 100755 --- a/bash/decoders/dump1090-mutability.sh +++ b/bash/decoders/dump1090-mutability.sh @@ -118,17 +118,17 @@ 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" +# Download the file rtl-sdr.rules from the osmocon rtl-sdr repository if it does not already exist. +if [[ ! -f "/etc/udev/rules.d/rtl-sdr.rules" ]] ; then + echo -e "\e[94m Downloading the file rtl-sdr.rules from the rtl-sdr repository...\e[97m" + sudo wget -O /etc/udev/rules.d/rtl-sdr.rules https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules + echo -e "\e[94m Restarting udev...\e[97m" + sudo service udev restart +fi # Create an RTL-SDR blacklist file so the device does not claim SDR's for other purposes. BlacklistModules -sudo service udev restart - ## ATTEMPT TO DOWNLOAD OR UPDATE THE COMPONENT FROM GITHUB if [[ -d "${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/dump1090" ]] && [[ -d "${RECEIVER_BUILD_DIRECTORY}/dump1090-mutability/dump1090/.git" ]] ; then @@ -364,12 +364,6 @@ if [[ ! -f "/usr/share/dump1090-mutability/html/upintheair.json" ]] ; then fi fi -# Download the file rtl-sdr.rules from the osmocon rtl-sdr repository if it does not already exist. -if [[ ! -f "/etc/udev/rules.d/rtl-sdr.rules" ]] ; then - echo -e "\e[94m Downloading the file rtl-sdr.rules from the rtl-sdr repository...\e[97m" - sudo wget -O /etc/udev/rules.d/rtl-sdr.rules https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules -fi - # (re)start dump1090-mutability. if [[ "`sudo systemctl status dump1090-mutability 2>&1 | egrep -c "Active: active (running)"`" -gt 0 ]] ; then echo -e "\e[94m Restarting the dump1090-mutability service...\e[97m"