From 818689bca5876c6e5c783832a0857c9ed0dcdc18 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Tue, 6 Aug 2019 10:13:57 +0200 Subject: [PATCH 01/15] Manually added newest version --- installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer.sh b/installer.sh index e52d153..1970cbb 100644 --- a/installer.sh +++ b/installer.sh @@ -74,9 +74,9 @@ echo "-------------------------------------------------------" wget 'http://dl.4players.de/ts/releases/?C=M;O=D' -q -O - | grep -i dir | grep -Eo '.*\/<\/a>' | grep -Eo '[0-9\.?]+' | uniq | sort -V -r > TS3V while read ts3version; do if [[ "${ts3version}" =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]; then - wget --spider -q http://dl.4players.de/ts/releases/${ts3version}/teamspeak3-server_linux_amd64-${ts3version}.tar.bz2 + wget --spider -q https://files.teamspeak-services.com/releases/server/3.9.1/teamspeak3-server_linux_amd64-3.9.1.tar.bz2 else - wget --spider -q http://dl.4players.de/ts/releases/${ts3version}/teamspeak3-server_linux-amd64-${ts3version}.tar.gz + wget --spider -q https://files.teamspeak-services.com/releases/server/3.9.1/teamspeak3-server_linux_amd64-3.9.1.tar.bz2 fi if [[ $? == 0 ]]; then break From cdcb098833d846ca60403502818e219de5a4bf64 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Tue, 6 Aug 2019 10:16:54 +0200 Subject: [PATCH 02/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4da4969..12eb2c4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This installer will automatically install TeamSpeak 3 onto your NAT VPS, and aut ### How do I install? To install TeamSpeak 3 automatically, run this command and follow the prompt. -``wget http://git.io/nat_ts3 --no-check-certificate -O /tmp/nat_ts3.sh && bash /tmp/nat_ts3.sh`` +``wget https://raw.githubusercontent.com/pnede3/NAT-TS3-Installer/master/installer.sh --no-check-certificate -O /tmp/nat_ts3.sh && bash /tmp/nat_ts3.sh`` ### Requirements This script will only work on OpenVZ container based VPS due to the fact it only checks for venet ethernet adapter. You can modify the code of this script before you run it if you want to install on a KVM/Xen VPS. From 9572034fee2c6215d14e084b142eacbfc07560a5 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 17:38:57 +0200 Subject: [PATCH 03/15] Update README.md Thanks Bosscoder! --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 12eb2c4..b095ddb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +This install script has been forked from an old project by Bosscoder, who has enabled my friends to use a Teamspeak server on a cheap NAT vps. + ## NAT TS3 Installer This installer will automatically install TeamSpeak 3 onto your NAT VPS, and automatically configure the ports to the ones you specify. From 38f00dbfa78a13dfff9336a5838efad404e8f680 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 18:01:53 +0200 Subject: [PATCH 04/15] Update installer.sh Added asking for license --- installer.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/installer.sh b/installer.sh index 1970cbb..2a6aa08 100644 --- a/installer.sh +++ b/installer.sh @@ -20,6 +20,20 @@ pvtip=$( ifconfig | grep 'inet addr:'| grep -v '127.0.0*' | cut -d ':' -f2 | aw # Get the external public IP of the server pubip=$( wget -qO- http://ipinfo.io/ip ) +read -p "Do you accept the Teamspeak License? [y/n]: " licensepermission +while true; do + if [[ "$licensepermission" == "y" ]]; then + echo "You accepted the Teamspeak License" + break + elif ! [[ "$fport" = "n" ]]; then + echo "You did not accept the Teamspeak License. Quiting installation." + exit 2 + break + else + break + fi +done + # Gives user the internal ip for reference and ask for desired ports echo "Your private internal IP is: $pvtip" read -p "Enter Voice Server port [9987]: " vport @@ -147,6 +161,8 @@ echo "" echo "" clear echo "TeamSpeak 3 has been successfully installed!" +echo "Automatically configuring ports..." + echo "Voice server is available at $pubip:$vport" echo "The file transfer port is: $fport" echo "The server query port is: $qport" From 007e7c99bb89263039ea79fb4ff6c42a7e8ef463 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 18:15:48 +0200 Subject: [PATCH 05/15] Update installer.sh Auto accept license --- installer.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/installer.sh b/installer.sh index 2a6aa08..c794e3b 100644 --- a/installer.sh +++ b/installer.sh @@ -23,10 +23,10 @@ pubip=$( wget -qO- http://ipinfo.io/ip ) read -p "Do you accept the Teamspeak License? [y/n]: " licensepermission while true; do if [[ "$licensepermission" == "y" ]]; then - echo "You accepted the Teamspeak License" + echo "You accepted the Teamspeak License." break elif ! [[ "$fport" = "n" ]]; then - echo "You did not accept the Teamspeak License. Quiting installation." + echo "Error: You did not accept the Teamspeak License. Quiting installation." exit 2 break else @@ -161,6 +161,11 @@ echo "" echo "" clear echo "TeamSpeak 3 has been successfully installed!" +echo "" +echo "" +echo "Accepting the license..." +touch /opt/ts3/.ts3server_license_accepted +echo "Accepted license!" echo "Automatically configuring ports..." echo "Voice server is available at $pubip:$vport" From 8f6598def1360abe14d978c479d3e69e07eebadf Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:00:17 +0200 Subject: [PATCH 06/15] Update installer.sh Update ports --- installer.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/installer.sh b/installer.sh index c794e3b..5d6342e 100644 --- a/installer.sh +++ b/installer.sh @@ -20,6 +20,7 @@ pvtip=$( ifconfig | grep 'inet addr:'| grep -v '127.0.0*' | cut -d ':' -f2 | aw # Get the external public IP of the server pubip=$( wget -qO- http://ipinfo.io/ip ) +# Ask the user if they accept the teamspeak license read -p "Do you accept the Teamspeak License? [y/n]: " licensepermission while true; do if [[ "$licensepermission" == "y" ]]; then @@ -85,6 +86,9 @@ fi echo "-------------------------------------------------------" echo "Detecting latest TeamSpeak 3 version, please wait..." echo "-------------------------------------------------------" + +#todo + wget 'http://dl.4players.de/ts/releases/?C=M;O=D' -q -O - | grep -i dir | grep -Eo '.*\/<\/a>' | grep -Eo '[0-9\.?]+' | uniq | sort -V -r > TS3V while read ts3version; do if [[ "${ts3version}" =~ ^[3-9]+\.[0-9]+\.1[2-9]+\.?[0-9]*$ ]]; then @@ -151,7 +155,8 @@ EOF chmod 755 /etc/init.d/teamspeak3 # Assign right ports and password to TS3 server -sed -i "s/{2}/{4} default_voice_port=$vport query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass/" /opt/ts3/ts3server_startscript.sh +sed -i "s/COMMANDLINE_PARAMETERS=""/COMMANDLINE_PARAMETERS="query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass"/" ts3server_startscript.sh +# Old line: sed -i "s/{2}/{4} default_voice_port=$vport query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass/" /opt/ts3/ts3server_startscript.sh # Set TS3 server to auto start on system boot update-rc.d teamspeak3 defaults From 603615e8cd8ed9f5d6c43a6f956c9f39c60a3e46 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:03:33 +0200 Subject: [PATCH 07/15] Update installer.sh Added where to find the license --- installer.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/installer.sh b/installer.sh index 5d6342e..f5f30af 100644 --- a/installer.sh +++ b/installer.sh @@ -25,6 +25,7 @@ read -p "Do you accept the Teamspeak License? [y/n]: " licensepermission while true; do if [[ "$licensepermission" == "y" ]]; then echo "You accepted the Teamspeak License." + echo "You can view the license by using: cat /opt/ts3/LICENSE" break elif ! [[ "$fport" = "n" ]]; then echo "Error: You did not accept the Teamspeak License. Quiting installation." From 2de744d325893ac46619eddaae835df79b7fde00 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:18:21 +0200 Subject: [PATCH 08/15] Update installer.sh Trying very hard to fix variables in sed --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.sh b/installer.sh index f5f30af..2ceba66 100644 --- a/installer.sh +++ b/installer.sh @@ -156,7 +156,7 @@ EOF chmod 755 /etc/init.d/teamspeak3 # Assign right ports and password to TS3 server -sed -i "s/COMMANDLINE_PARAMETERS=""/COMMANDLINE_PARAMETERS="query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass"/" ts3server_startscript.sh +sed -i 's/COMMANDLINE_PARAMETERS=""/COMMANDLINE_PARAMETERS="query_port='$qport' filetransfer_port='$fport' filetransfer_ip=0.0.0.0 serveradmin_password='$apass'"/' /opt/ts3/ts3server_startscript.sh # Old line: sed -i "s/{2}/{4} default_voice_port=$vport query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass/" /opt/ts3/ts3server_startscript.sh # Set TS3 server to auto start on system boot From a4a035da146d6381c3daf97a5e597c171d22a842 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:21:19 +0200 Subject: [PATCH 09/15] Update installer.sh Fixed ports --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.sh b/installer.sh index 2ceba66..f7f9c26 100644 --- a/installer.sh +++ b/installer.sh @@ -156,7 +156,7 @@ EOF chmod 755 /etc/init.d/teamspeak3 # Assign right ports and password to TS3 server -sed -i 's/COMMANDLINE_PARAMETERS=""/COMMANDLINE_PARAMETERS="query_port='$qport' filetransfer_port='$fport' filetransfer_ip=0.0.0.0 serveradmin_password='$apass'"/' /opt/ts3/ts3server_startscript.sh +sed -i 's/COMMANDLINE_PARAMETERS=""/COMMANDLINE_PARAMETERS="query_port='$qport' query_ip=0.0.0.0 default_voice_port='$vport' voice_ip=0.0.0.0 filetransfer_port='$fport' filetransfer_ip=0.0.0.0 serveradmin_password='$apass'"/' /opt/ts3/ts3server_startscript.sh # Old line: sed -i "s/{2}/{4} default_voice_port=$vport query_port=$qport filetransfer_port=$fport filetransfer_ip=0.0.0.0 serveradmin_password=$apass/" /opt/ts3/ts3server_startscript.sh # Set TS3 server to auto start on system boot From 5a7931f621f209c58db3d44eb17cc70a1413322a Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:34:25 +0200 Subject: [PATCH 10/15] Update installer.sh added private token --- installer.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installer.sh b/installer.sh index f7f9c26..a8dc8f1 100644 --- a/installer.sh +++ b/installer.sh @@ -182,6 +182,9 @@ read -p "Start the server now? [y/n]: " startopt sleep 1 if [ "$startopt" == "y" ] || [ "$startopt" == "yes" ]; then echo "Please keep the following details safe!" + cd /opt/ts3/logs + privatetoken = cat $(ls -t1 | tail -1) + echo "$privatetoken" sleep 2 /etc/init.d/teamspeak3 start else From 41db80e6a1af57944245328df0d72270a8e7b485 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:36:47 +0200 Subject: [PATCH 11/15] Update installer.sh Hardcoding all the way --- installer.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/installer.sh b/installer.sh index a8dc8f1..c4457a5 100644 --- a/installer.sh +++ b/installer.sh @@ -182,9 +182,8 @@ read -p "Start the server now? [y/n]: " startopt sleep 1 if [ "$startopt" == "y" ] || [ "$startopt" == "yes" ]; then echo "Please keep the following details safe!" - cd /opt/ts3/logs - privatetoken = cat $(ls -t1 | tail -1) - echo "$privatetoken" + cd ../../../../../../../opt/ts3/logs + cat $(ls -t1 | tail -1) sleep 2 /etc/init.d/teamspeak3 start else From d085b500b5a9a22005f7534d9913170f0dbb2df6 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:41:14 +0200 Subject: [PATCH 12/15] Update installer.sh Added explanation for how to get the private token --- installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer.sh b/installer.sh index c4457a5..c5425a9 100644 --- a/installer.sh +++ b/installer.sh @@ -181,9 +181,9 @@ echo "" read -p "Start the server now? [y/n]: " startopt sleep 1 if [ "$startopt" == "y" ] || [ "$startopt" == "yes" ]; then - echo "Please keep the following details safe!" - cd ../../../../../../../opt/ts3/logs - cat $(ls -t1 | tail -1) + echo "To find your private token to configure your server, use:" + echo "cd opt/ts3/logs" + echo "ls -t1 | tail -1" sleep 2 /etc/init.d/teamspeak3 start else From bc9e20720a2aeb57d301c77c30fe033ac8ab0b01 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:42:40 +0200 Subject: [PATCH 13/15] Update installer.sh Whoops --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.sh b/installer.sh index c5425a9..8109501 100644 --- a/installer.sh +++ b/installer.sh @@ -183,7 +183,7 @@ sleep 1 if [ "$startopt" == "y" ] || [ "$startopt" == "yes" ]; then echo "To find your private token to configure your server, use:" echo "cd opt/ts3/logs" - echo "ls -t1 | tail -1" + echo "cat $(ls -t1 | tail -1)" sleep 2 /etc/init.d/teamspeak3 start else From 45302d0e2a795c5161761dd1079136ff44cb2977 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 19:44:00 +0200 Subject: [PATCH 14/15] Update installer.sh comment --- installer.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/installer.sh b/installer.sh index 8109501..91d6fd1 100644 --- a/installer.sh +++ b/installer.sh @@ -1,6 +1,7 @@ #!/bin/bash # Easy TeamSpeak 3 installer for Debian based OS # Tested on Debian 7/8 and Ubuntu 14.04 LTS +# And also tested on Ubuntu 16 on a cheap NAT VPS! # Check for root account if [[ "$EUID" -ne 0 ]]; then From 7e96ff828531173e7d65e6808e518e9be8bcd7f4 Mon Sep 17 00:00:00 2001 From: Thijs Nederlof Date: Thu, 8 Aug 2019 21:07:23 +0200 Subject: [PATCH 15/15] Update README.md Added thanks --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b095ddb..4352f7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This install script has been forked from an old project by Bosscoder, who has enabled my friends to use a Teamspeak server on a cheap NAT vps. +This install script has been forked from an old project by Bosscoder, who has enabled my friends to use a Teamspeak server on a cheap NAT vps. Thanks bosscoder! ## NAT TS3 Installer This installer will automatically install TeamSpeak 3 onto your NAT VPS, and automatically configure the ports to the ones you specify.