Kaynağa Gözat

SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

Daniel Gibbs 7 yıl önce
ebeveyn
işleme
685f51623c
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      lgsm/functions/install_ts3db.sh

+ 2 - 2
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