diff --git a/bash/feeders/adsbexchange.sh b/bash/feeders/adsbexchange.sh old mode 100644 new mode 100755 index 11640d9..8f667e1 --- a/bash/feeders/adsbexchange.sh +++ b/bash/feeders/adsbexchange.sh @@ -70,10 +70,11 @@ printf "Configuring PiAware if it is installed..." if [ $(dpkg-query -W -f='${Status}' piaware 2>/dev/null | grep -c "ok installed") != 0 ]; then echo -e "\033[33m" echo "Adding the ADS-B Exchange feed to PiAware's configuration..." - ORIGINALFORMAT=`sudo piaware-config -show | grep mlatResultsFormat | sed 's/mlatResultsFormat //g'` - MLATRESULTS=`sed 's/[{}]//g' <<< $ORIGINALFORMAT` + + ORIGINALFORMAT=`sudo piaware-config -show mlat-results-format` CLEANFORMAT=`sed 's/ beast,connect,feed.adsbexchange.com:30005//g' <<< $MLATRESULTS` - sudo piaware-config -mlatResultsFormat "${CLEANFORMAT} beast,connect,feed.adsbexchange.com:30005" + FINALFORMAT="${CLEANFORMAT} beast,connect,feed.adsbexchange.com:30005" | sed -e 's/^[ \t]*//' + sudo piaware-config mlat-results-format "${FINALFORMAT}" echo "Restarting PiAware so new configuration takes effect..." echo -e "\033[37m" sudo piaware-config -restart diff --git a/bash/feeders/piaware.sh b/bash/feeders/piaware.sh index 4f93e35..81c2763 100755 --- a/bash/feeders/piaware.sh +++ b/bash/feeders/piaware.sh @@ -149,21 +149,22 @@ echo "If you decide not to supply a login and password you should still be able echo "feeder by visting the page http://flightaware.com/adsb/piaware/claim." echo -e "\033[37m" read -p "Your FlightAware Login: " FALOGIN -sudo piaware-config -user $FALOGIN -password +read -p "Your FlightAware Password: " FAPASSWD1 +read -p "Repeat Your FlightAware Password: " FAPASSWD2 -echo -e "\033[33m" -printf "Setting PiAware to send MLAT results on port 30104..." -ORIGINALFORMAT=`sudo piaware-config -show | grep mlatResultsFormat | sed 's/mlatResultsFormat //g'` -MLATRESULTS=`sed 's/[{}]//g' <<< $ORIGINALFORMAT` -CLEANFORMAT=`sed 's/beast,connect,localhost:30104//g' <<< $MLATRESULTS` -FINALFORMAT="${CLEANFORMAT} beast,connect,localhost:30104" | sed -e 's/^[ \t]*//' -# Make sure that the mlatResultsFormat setting is not left blank if no other settings exist.. -if [ -n "$FINALFORMAT" ]; then - sudo piaware-config -mlatResultsFormat "${FINALFORMAT}" -else - sudo piaware-config -mlatResultsFormat "beast,connect,localhost:30104" -fi -echo -e "\033[32m [OK]" +# Check that the supplied passwords match. +while [ $FAPASSWD1 != $FAPASSWD2 ]; do + echo -e "\033[33m" + echo "The supplied passwords did not match." + echo -e "\033[37m" + read -p "Your FlightAware Password: " FAPASSWD1 + read -p "Repeat Your FlightAware Password: " FAPASSWD2 +done +echo "" + +# Set the supplied user name and password in the configuration. +sudo piaware-config flightaware-user $FALOGIN +sudo piaware-config flightaware-password $FAPASSWD1 echo -e "\e[33m" echo "Restarting PiAware to ensure all changes are applied..." diff --git a/bash/variables.sh b/bash/variables.sh index 05c2532..39a32d6 100644 --- a/bash/variables.sh +++ b/bash/variables.sh @@ -34,7 +34,7 @@ ## SOFTWARE VERSIONS # FlightAware PiAware -PIAWAREVERSION="3.0.3" +PIAWAREVERSION="3.0.4" PIAWAREBRANCH="master" # PlaneFinder ADS-B Client