From 685f51623ca0d3b493e2c85169a79f0ac5c986b9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 18 Jul 2018 19:09:06 +0100 Subject: [PATCH] SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. --- lgsm/functions/install_ts3db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index 83ec249b9..09dac54b5 100644 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -14,8 +14,8 @@ fn_install_ts3db_mariadb(){ echo "checking if libmariadb2 is installed" echo "=================================" sleep 0.5 - ldd "${serverfiles}/libts3db_mariadb.so" | grep "libmariadb.so.2 => not found" - if [ $? -eq 0 ]; then + + if ldd "${serverfiles}/libts3db_mariadb.so" | grep "libmariadb.so.2 => not found" echo "libmariadb2 not installed. Please install it first." echo "exiting..." exit