From cb29924ea116691271e5278292696d401fadfbf0 Mon Sep 17 00:00:00 2001 From: PhilPhonic Date: Fri, 25 Dec 2015 17:49:43 +0100 Subject: [PATCH] check for libmariadb2 if the user chose to install ts3 with mariadb/mysql, the script checks if libmariadb2 is installed. if not, installation is aborted --- functions/fn_install_ts3db | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/functions/fn_install_ts3db b/functions/fn_install_ts3db index dc7e62003..b1119ee52 100644 --- a/functions/fn_install_ts3db +++ b/functions/fn_install_ts3db @@ -6,7 +6,18 @@ lgsm_version="251215" fn_install_ts3db_mariadb(){ echo "" - echo "Configuring ${gamename} Server for MariaDB" + echo "checking if libmariadb2 is installed" + echo "=================================" + ldd ${filesdir}/libts3db_mariadb.so | grep "libmariadb.so.2 => not found" + if [ $? -eq 0 ]; then + echo "libmariadb2 not installed. Please install it first." + echo "exiting..." + exit + else + echo "libmariadb2 installed." + fi + echo "" + echo "Configuring ${gamename} Server for MariaDB/MySQL" echo "=================================" sleep 1 read -p "Enter MariaDB hostname: " mariahostname