updates/fixes

This commit is contained in:
2022-07-04 07:41:10 -07:00
parent 4b0adf475d
commit fdcac64409
9 changed files with 191 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ if [ -e /ts3server/ts3server_minimal_runscript.sh ]
else else
echo " " echo " "
echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now." echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/scripts/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh
cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/ cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/
rm -fr /ts3temp/ts3server_minimal_runscript.sh rm -fr /ts3temp/ts3server_minimal_runscript.sh
fi fi
@@ -54,7 +54,7 @@ if [ -e /ts3server/ts3db_mariadb.ini ]
else else
echo " " echo " "
echo "WARNING ! ts3db_mariadb.ini not found ... will download now." echo "WARNING ! ts3db_mariadb.ini not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/files/ts3db_mariadb.ini -O /ts3temp/inifiles/ts3db_mariadb.ini wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3db_mariadb.ini -O /ts3temp/inifiles/ts3db_mariadb.ini
cp /ts3temp/inifiles/ts3db_mariadb.ini /ts3server/ cp /ts3temp/inifiles/ts3db_mariadb.ini /ts3server/
rm -fr /ts3temp/inifiles/ts3db_mariadb.ini rm -fr /ts3temp/inifiles/ts3db_mariadb.ini
fi fi
@@ -64,10 +64,20 @@ if [ -e /ts3server/ts3server.ini ]
else else
echo " " echo " "
echo "WARNING ! ts3server.ini not found ... will download now." echo "WARNING ! ts3server.ini not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini
cp /ts3temp/inifiles/ts3server.ini /ts3server/ cp /ts3temp/inifiles/ts3server.ini /ts3server/
rm -fr /ts3temp/inifiles/ts3server.ini rm -fr /ts3temp/inifiles/ts3server.ini
fi fi
if [ -e /ts3server/.ts3server_license_accepted ]
then
echo "INFO ! .ts3server_license_accepted found ... will not download."
else
echo " "
echo "WARNING ! .ts3server_license_accepted not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/.ts3server_license_accepted -O /ts3temp/.ts3server_license_accepted
cp /ts3temp/.ts3server_license_accepted /ts3server/
rm -fr /ts3temp/.ts3server_license_accepted
fi
sleep 1 sleep 1

View File

@@ -44,7 +44,7 @@ if [ -e /ts3server/ts3server_minimal_runscript.sh ]
else else
echo " " echo " "
echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now." echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/scripts/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh
cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/ cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/
rm -fr /ts3temp/ts3server_minimal_runscript.sh rm -fr /ts3temp/ts3server_minimal_runscript.sh
fi fi
@@ -54,10 +54,20 @@ if [ -e /ts3server/ts3server.ini ]
else else
echo " " echo " "
echo "WARNING ! ts3server.ini not found ... will download now." echo "WARNING ! ts3server.ini not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak3/master/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/basic/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini
cp /ts3temp/inifiles/ts3server.ini /ts3server/ cp /ts3temp/inifiles/ts3server.ini /ts3server/
rm -fr /ts3temp/inifiles/ts3server.ini rm -fr /ts3temp/inifiles/ts3server.ini
fi fi
if [ -e /ts3server/.ts3server_license_accepted ]
then
echo "INFO ! .ts3server_license_accepted found ... will not download."
else
echo " "
echo "WARNING ! .ts3server_license_accepted not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/.ts3server_license_accepted -O /ts3temp/.ts3server_license_accepted
cp /ts3temp/.ts3server_license_accepted /ts3server/
rm -fr /ts3temp/.ts3server_license_accepted
fi
sleep 1 sleep 1

View File

@@ -44,7 +44,7 @@ if [ -e /ts3server/ts3server_minimal_runscript.sh ]
else else
echo " " echo " "
echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now." echo "WARNING ! ts3server_minimal_runscript.sh not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/scripts/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3server_minimal_runscript.sh -O /ts3temp/inifiles/ts3server_minimal_runscript.sh
cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/ cp /ts3temp/inifiles/ts3server_minimal_runscript.sh /ts3server/
rm -fr /ts3temp/ts3server_minimal_runscript.sh rm -fr /ts3temp/ts3server_minimal_runscript.sh
fi fi
@@ -54,7 +54,7 @@ if [ -e /ts3server/ts3db_mariadb.ini ]
else else
echo " " echo " "
echo "WARNING ! ts3db_mariadb.ini not found ... will download now." echo "WARNING ! ts3db_mariadb.ini not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/files/ts3db_mariadb.ini -O /ts3temp/inifiles/ts3db_mariadb.ini wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3db_mariadb.ini -O /ts3temp/inifiles/ts3db_mariadb.ini
cp /ts3temp/inifiles/ts3db_mariadb.ini /ts3server/ cp /ts3temp/inifiles/ts3db_mariadb.ini /ts3server/
rm -fr /ts3temp/inifiles/ts3db_mariadb.ini rm -fr /ts3temp/inifiles/ts3db_mariadb.ini
fi fi
@@ -64,10 +64,20 @@ if [ -e /ts3server/ts3server.ini ]
else else
echo " " echo " "
echo "WARNING ! ts3server.ini not found ... will download now." echo "WARNING ! ts3server.ini not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/files-for-dockers/master/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/ts3server.ini -O /ts3temp/inifiles/ts3server.ini
cp /ts3temp/inifiles/ts3server.ini /ts3server/ cp /ts3temp/inifiles/ts3server.ini /ts3server/
rm -fr /ts3temp/inifiles/ts3server.ini rm -fr /ts3temp/inifiles/ts3server.ini
fi fi
if [ -e /ts3server/.ts3server_license_accepted ]
then
echo "INFO ! .ts3server_license_accepted found ... will not download."
else
echo " "
echo "WARNING ! .ts3server_license_accepted not found ... will download now."
wget --no-cache https://raw.githubusercontent.com/fithwum/teamspeak-server/master/files/.ts3server_license_accepted -O /ts3temp/.ts3server_license_accepted
cp /ts3temp/.ts3server_license_accepted /ts3server/
rm -fr /ts3temp/.ts3server_license_accepted
fi
sleep 1 sleep 1

View File

@@ -0,0 +1 @@
license_accepted=1

6
files/ts3db_mariadb.ini Normal file
View File

@@ -0,0 +1,6 @@
[config]
host=0.0.0.0
port=3306
username=tsdbuser
password=tsdbpassword
database=tsdatabase

30
files/ts3server.ini Normal file
View File

@@ -0,0 +1,30 @@
machine_id=
default_voice_port=9987
voice_ip=
licensepath=
filetransfer_port=30033
filetransfer_ip=
query_port=10011
query_ip=0.0.0.0, ::
query_ip_allowlist=query_ip_whitelist.txt
query_ip_denylist=query_ip_blacklist.txt
dbplugin=ts3db_mariadb
dbpluginparameter=ts3db_mariadb.ini
dbsqlpath=sql/
dbsqlcreatepath=create_mariadb/
dbconnections=10
logpath=logs/
logquerycommands=1
dbclientkeepdays=30
logappend=1
query_skipbruteforcecheck=0
query_buffer_mb=20
http_proxy=
license_accepted=1
serverquerydocs_path=serverquerydocs/
query_ssh_ip=0.0.0.0, ::
query_ssh_port=10022
query_protocols=raw
query_ssh_rsa_host_key=ssh_host_rsa_key
query_timeout=300
crashdumps_path=crashdumps/

View File

@@ -0,0 +1,8 @@
#!/bin/sh
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"
D1=$(readlink -f "$0")
D2=$(dirname "${D1}")
cd "${D2}"
exec ./ts3server $@

6
files/ts3server_start.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Copyright (c) 2018 fithwum
# All rights reserved
# run teamspeak server
exec ../ts3server/ts3server inifile=ts3server.ini start

View File

@@ -0,0 +1,102 @@
#!/bin/bash
# Copyright (c) 2010 TeamSpeak Systems GmbH
# All rights reserved
COMMANDLINE_PARAMETERS="inifile=ts3server.ini" #add any command line parameters you want to pass here
LIBRARYPATH="$(pwd)"
BINARYNAME="ts3server"
case "$1" in
start)
if [ -e ts3server.pid ]; then
if ( kill -0 $(cat ts3server.pid) 2> /dev/null ); then
echo "The server is already running, try restart or stop"
exit 1
else
echo "ts3server.pid found, but no server running. Possibly your previously started server crashed"
echo "Please view the logfile for details."
rm ts3server.pid
fi
fi
if [ "${UID}" = "0" ]; then
echo WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT
c=1
while [ "$c" -le 10 ]; do
echo -n "!"
sleep 1
c=$(($c+1))
done
echo "!"
fi
echo "Starting the TeamSpeak 3 server"
if [ -e "$BINARYNAME" ]; then
if [ ! -x "$BINARYNAME" ]; then
echo "${BINARYNAME} is not executable, trying to set it"
chmod u+x "${BINARYNAME}"
fi
if [ -x "$BINARYNAME" ]; then
export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}"
"./${BINARYNAME}" ${COMMANDLINE_PARAMETERS} > /dev/null &
PID=$!
ps -p ${PID} > /dev/null 2>&1
if [ "$?" -ne "0" ]; then
echo "TeamSpeak 3 server could not start"
else
echo $PID > ts3server.pid
echo "TeamSpeak 3 server started, for details please view the log file"
fi
else
echo "${BINARNAME} is not exectuable, cannot start TeamSpeak 3 server"
fi
else
echo "Could not find binary, aborting"
exit 5
fi
;;
stop)
if [ -e ts3server.pid ]; then
echo -n "Stopping the TeamSpeak 3 server"
if ( kill -TERM $(cat ts3server.pid) 2> /dev/null ); then
c=1
while [ "$c" -le 300 ]; do
if ( kill -0 $(cat ts3server.pid) 2> /dev/null ); then
echo -n "."
sleep 1
else
break
fi
c=$(($c+1))
done
fi
if ( kill -0 $(cat ts3server.pid) 2> /dev/null ); then
echo "Server is not shutting down cleanly - killing"
kill -KILL $(cat ts3server.pid)
else
echo "done"
fi
rm ts3server.pid
else
echo "No server running (ts3server.pid is missing)"
exit 7
fi
;;
restart)
$0 stop && $0 start ${COMMANDLINE_PARAMETERS} || exit 1
;;
status)
if [ -e ts3server.pid ]; then
if ( kill -0 $(cat ts3server.pid) 2> /dev/null ); then
echo "Server is running"
else
echo "Server seems to have died"
fi
else
echo "No server running (ts3server.pid is missing)"
fi
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 2
esac
exit 0