Skip to content

Commit

Permalink
Took out redundant lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazka authored Mar 1, 2018
1 parent 625b0ce commit 990ced4
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions bash/decoders/dump1090-mutability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 990ced4

Please sign in to comment.