From 0da0c7b3b6319a5c94106f98915779e11e5f1e54 Mon Sep 17 00:00:00 2001 From: Joe Prochazka Date: Thu, 21 Jun 2018 12:04:12 -0400 Subject: [PATCH] Check for socat in /usr/bin/. --- bash/feeders/adsbexchange.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bash/feeders/adsbexchange.sh b/bash/feeders/adsbexchange.sh index 508b660..9e88eb2 100755 --- a/bash/feeders/adsbexchange.sh +++ b/bash/feeders/adsbexchange.sh @@ -271,12 +271,28 @@ if [ ! -d "$RECEIVER_BUILD_DIRECTORY/adsbexchange" ]; then fi echo -e "\e[94m Creating the file adsbexchange-socat_maint.sh...\e[97m" + +# Some distgros place socat in /usr/bin instead of /user/sbin.. +if [ -f "/usr/sbin/socat" ]; then + SOCAT_PATH="/usr/sbin/socat" +fi +if [ -f "/usr/bin/socat" ]; then + SOCAT_PATH="/usr/bin/socat" +fi +if [ -z $SOCAT_PATH ]; then + echo -e "" + echo -e "\e[91m \e[5mINSTALLATION HALTED!\e[25m" + echo -e " UNABLE TO LOCATE SOCAT." + echo -e "" + exit 1 +fi + tee $RECEIVER_BUILD_DIRECTORY/adsbexchange/adsbexchange-socat_maint.sh > /dev/null <