7 changed files with 100 additions and 29 deletions
@ -0,0 +1,20 @@ |
|||
machine_id= |
|||
default_voice_port=9987 |
|||
voice_ip=0.0.0.0 |
|||
licensepath= |
|||
filetransfer_port=30033 |
|||
filetransfer_ip=0.0.0.0 |
|||
query_port=10011 |
|||
query_ip=0.0.0.0 |
|||
query_ip_whitelist=query_ip_whitelist.txt |
|||
query_ip_blacklist=query_ip_blacklist.txt |
|||
dbplugin=ts3db_sqlite3 |
|||
dbpluginparameter= |
|||
dbsqlpath=sql/ |
|||
dbsqlcreatepath=create_sqlite/ |
|||
dbconnections=10 |
|||
logpath=logs |
|||
logquerycommands=0 |
|||
dbclientkeepdays=30 |
|||
logappend=0 |
|||
query_skipbruteforcecheck=0 |
@ -0,0 +1,63 @@ |
|||
#!/bin/bash |
|||
# LGSM fn_install_ts3_mariadb function |
|||
# Author: Daniel Gibbs |
|||
# Website: http://gameservermanagers.com |
|||
lgsm_version="251215" |
|||
|
|||
fn_install_ts3db_mariadb(){ |
|||
echo "" |
|||
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 |
|||
read -p "Enter MariaDB port: " mariaport |
|||
read -p "Enter MariaDB username: " mariausername |
|||
read -p "Enter MariaDB password: " mariapassword |
|||
read -p "Enter MariaDB database name: " mariadbname |
|||
echo "updating config." |
|||
echo "[config]" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "host='${mariahostname}'" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "port='${mariaport}'" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "username='${mariausername}'" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "password='${mariapassword}'" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "database='${mariadbname}'" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
echo "socket=" >> ${servercfgdir}/ts3db_mariadb.ini |
|||
sed -i "s/dbplugin=ts3db_sqlite3/dbplugin=ts3db_mariadb/g" "${servercfgfullpath}" |
|||
sed -i "s/dbpluginparameter=/dbpluginparameter=ts3db_mariadb.ini/g" "${servercfgfullpath}" |
|||
sed -i "s/dbsqlcreatepath=create_sqlite\//dbsqlcreatepath=create_mariadb\//g" "${servercfgfullpath}" |
|||
echo "=================================" |
|||
sleep 1 |
|||
} |
|||
|
|||
echo "" |
|||
while true; do |
|||
read -e -i "n" -p "Do you want to use MariaDB/MySQL instead of sqlite (Database Server including user and database already has to be set up!)? [y/N]" yn |
|||
case $yn in |
|||
[Yy]* ) fn_install_ts3db_mariadb && break;; |
|||
[Nn]* ) break;; |
|||
* ) echo "Please answer yes or no.";; |
|||
esac |
|||
done |
|||
|
|||
## Get privilege key |
|||
echo "" |
|||
echo "Getting privilege key" |
|||
echo "=================================" |
|||
sleep 1 |
|||
echo "IMPORANT! Save these details for later." |
|||
sleep 1 |
|||
cd "${executabledir}" |
|||
./ts3server_startscript.sh start inifile=ts3-server.ini |
|||
sleep 5 |
|||
./ts3server_startscript.sh stop |
Loading…
Reference in new issue