diff --git a/bash/decoders/dump1090-mutability.sh b/bash/decoders/dump1090-mutability.sh index 1df86f4..540d253 100644 --- a/bash/decoders/dump1090-mutability.sh +++ b/bash/decoders/dump1090-mutability.sh @@ -115,6 +115,18 @@ echo -e "\033[37m" cd $BUILDDIR sudo dpkg -i dump1090-mutability_1.15~dev_*.deb +## CHECK THAT THE PACKAGE INSTALLED + +if [ $(dpkg-query -W -f='${Status}' dump1090-mutability 2>/dev/null | grep -c "ok installed") -eq 0 ]; then + echo "\033[31m" + echo "The dump1090-mutability package did not install properly!" + echo -e "\033[33m" + echo "This script has exited due to the error encountered." + echo "Please read over the above output in order to determine what went wrong." + echo "" + exit 1 +fi + ## START DUMP1090-MUTABILITY echo -e "\033[33m" diff --git a/bash/feeders/piaware.sh b/bash/feeders/piaware.sh index 1028480..38dc313 100644 --- a/bash/feeders/piaware.sh +++ b/bash/feeders/piaware.sh @@ -131,6 +131,18 @@ echo "Installing the PiAware package..." echo -e "\033[37m" sudo dpkg -i $BUILDDIR/piaware_builder/piaware_2.1-3_*.deb +## CHECK THAT THE PACKAGE INSTALLED + +if [ $(dpkg-query -W -f='${Status}' piaware 2>/dev/null | grep -c "ok installed") -eq 0 ]; then + echo "\033[31m" + echo "The piaware package did not install properly!" + echo -e "\033[33m" + echo "This script has exited due to the error encountered." + echo "Please read over the above output in order to determine what went wrong." + echo "" + exit 1 +fi + ## CONFIGURE FLIGHTAWARE echo -e "\033[33m" @@ -140,7 +152,6 @@ echo -e "\033[37m" read -p "Your FlightAware Login: " FALOGIN sudo piaware-config -user $FALOGIN -password - echo -e "\033[33m" echo "PiAware now sends MLAT results to port 30104 by default. This change is to try to avoid accidentally" echo "feeding MLAT results to a Dump 1090 that is not MLAT-aware and may forward the results on unexpectedly." diff --git a/bash/feeders/planefinder.sh b/bash/feeders/planefinder.sh index ffadafe..c9d05b2 100644 --- a/bash/feeders/planefinder.sh +++ b/bash/feeders/planefinder.sh @@ -131,6 +131,18 @@ else fi fi +## CHECK THAT THE PACKAGE INSTALLED + +if [ $(dpkg-query -W -f='${Status}' pfclient 2>/dev/null | grep -c "ok installed") -eq 0 ]; then + echo "\033[31m" + echo "The piaware package did not install properly!" + echo -e "\033[33m" + echo "This script has exited due to the error encountered." + echo "Please read over the above output in order to determine what went wrong." + echo "" + exit 1 +fi + ## DISPLAY FINAL SETUP INSTRUCTIONS WHICH CONNOT BE HANDLED BY THIS SCRIPT echo -e "\033[31m"