"ts3 install script" Code Answer's

You're definitely familiar with the best coding language Shell/Bash that developers use to develop their projects and they get all their queries like "ts3 install script" answered properly. Developers are finding an appropriate answer about ts3 install script related to the Shell/Bash coding language. By visiting this online portal developers get answers concerning Shell/Bash codes question like ts3 install script. Enter your desired code related query in the search bar and get every piece of information about Shell/Bash code related question on ts3 install script. 

ts3 install script

By FloatDevFloatDev on Nov 29, 2020
#!/bin/bash

#########################################
# Teamspeak 3 Server Installer
# Version 3.12.1
# last Update 19.02.2020
# by SIGNALTRANSMITTER.de
#########################################

c=`tput setaf 6`
w=`tput setaf 7`
r=`tput setaf 1`
y=`tput setaf 3`

### DIESE VARIABLEN KOENNEN GEAENDERT WERDEN
#TEAMSPEAK USERNAME
user="teamspeak"

#INSTALLATIONS-PFAD
installdir="/home/$user/ts/"

#TEAMSPEAK VERSION
version="3.12.1"

############################################

x64="https://files.teamspeak-services.com/releases/server/$version/teamspeak3-server_linux_amd64-$version.tar.bz2"
x86="https://files.teamspeak-services.com/releases/server/$version/teamspeak3-server_linux_x86-$version.tar.bz2"

echo "Dieses Script installiert Teamspeak Server in der Version $r[$version]$w vollkommen automatisch. Die Funktion wird nicht garantiert! $w"
echo "$y[ ACHTUNG ] Um die Version anzupassen, bitte die Variablen im Script editieren!"

if [ -e /etc/locale.gen ]; then
    echo "$c[ INFO ]$w Locales werden installiert"
    sed -i "s/^# de_DE/de_DE/" /etc/locale.gen >/dev/null
    grep -v "^#" /etc/locale.gen >/dev/null
    /usr/sbin/locale-gen >/dev/null
    update-locale LANG=de_DE.UTF-8 >/dev/null
else
    echo "$c[ INFO ]$w Fehler beim konfigurieren von locales"
fi

if [ $(dpkg-query -W -f='${Status}' bzip2 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
    echo "$c[ INFO ]$w Installiere Abhängigkeit bzip2"
    apt-get update;
    apt-get install -y bzip2;
fi

if [ $(dpkg-query -W -f='${Status}' ca-certificates 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
    echo "$c[ INFO ]$w Installiere Abhängigkeit ca-certificates"
    apt-get update;
    apt-get install -y ca-certificates;
fi

ts3u=`cut -d: -f1 /etc/passwd | grep teamspeak`

if [ "$ts3" = "teamspeak" ]; then
    echo "$c[ INFO ]$w Der User $ts3u existiert schon. Bitte den User im Script anpassen."
    exit
else
    echo "$c[ INFO ]$w Erstelle Teamspeak-User..."
    useradd $user
fi

echo "$c[ INFO ]$w Die Installation beginnt automatisch in 5 Sekunden..."
sleep 5

if [ -d "$installdir" ]; then
    echo "$r[ ERROR ]$w Das Verzeichnis $installdir existiert bereits. Breche ab!"
    exit
else
    echo "$c[ INFO ]$w Das Verzeichnis $installdir existiert nicht. $installdir wird erstellt..."
    mkdir -p $installdir
fi

cd $installdir

if [ $(uname -m) == 'x86_64' ]; then
    #64bit
    wget -q $x64
    tar xfj teamspeak3-server_linux_amd64*
    echo "$c[ INFO ]$w Entferne gepacktes Archiv..."
    cd "teamspeak3-server_linux_amd64"
    mv * .. && cd .. && rm -rf teamspeak3-server_linux_amd64* && cd .. && chown -R $user:$user $installdir
    echo "$c[ INFO ]$w Der Teamspeak Server wird erstmalig gestartet..."
    cd $installdir
    touch .ts3server_license_accepted
    su -c "./ts3server_minimal_runscript.sh > ADMIN &" -s /bin/bash $user
    sleep 5 && ps aufwx | grep teamspeak | grep -v grep | awk '{print $2}'
    echo "$c[ INFO ]$w Bitte den Token sowie Serveradmin-Login gut hinterlegen..."
else
    #32bit
    wget -q $x86
    tar xfj teamspeak3-server_linux_x86*
    echo "$c[ INFO ]$w Entferne gepacktes Archiv..."
    cd "teamspeak3-server_linux_x86"
    mv * .. && cd .. && rm -rf teamspeak3-server_linux_amd64* && cd .. && chown -R $user:$user $installdir
    echo "$c[ INFO ]$w Der Teamspeak Server wird erstmalig gestartet..."
    touch .ts3server_license_accepted
    cd $installdir
    su -c "./ts3server_minimal_runscript.sh > ADMIN &" -s /bin/bash $user
    sleep 5 && ps aufwx | grep teamspeak | grep -v grep | awk '{print $2}'
    echo "$c[ INFO ]$w Bitte den Token sowie den Serveradmin-Login gut hinterlegen..."
fi

echo "$c[ INFO ]$w Soll Teamspeak in den Autostart installiert werden? [y/n]"
read -n1 -p "" autostart
case $autostart in
  y|Y)
     echo -e "\n$c[ INFO ]$w Der Startparameter wurde im Autostart hinterlegt."
     echo "su -c '$installdir/ts3server_startscript.sh start' -s /bin/bash $user" | tee --append /etc/rc.local > /dev/null
    ;;
    *)
     echo -e "\n$c[ INFO ]$w Der Startparameter wird$y nicht$w in den Autostart geschrieben."
    ;;
esac
echo "$c[ INFO ]$w Der Teamspeak Server wird nun automatisch gestartet..."

Source: signaltransmitter.de

Add Comment

1

All those coders who are working on the Shell/Bash based application and are stuck on ts3 install script can get a collection of related answers to their query. Programmers need to enter their query on ts3 install script related to Shell/Bash code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about ts3 install script for the programmers working on Shell/Bash code while coding their module. Coders are also allowed to rectify already present answers of ts3 install script while working on the Shell/Bash language code. Developers can add up suggestions if they deem fit any other answer relating to "ts3 install script". Visit this developer's friendly online web community, CodeProZone, and get your queries like ts3 install script resolved professionally and stay updated to the latest Shell/Bash updates. 

Shell/Bash answers related to "ts3 install script"

View All Shell/Bash queries

Shell/Bash queries related to "ts3 install script"

ts3 install script bash call another script relative to current script how to compare float values in shell script how to store float values in shell script how to sort array in shell script batch script arguments shell script variable shell script:while done linux startup script how to take array input in shell script fish shell script parent directory multiple dots execute powershell script from command line with parameters How can I remove the first line of a text file using bash/sed script? powershell script has no signature how to run power shell script Running a local script on a remote machine (or remote on local) telnet in shell script powershell script to create dummy users in active directory Exit bash script if not running as root Failed at the [email protected] postinstall script. show dialog box shell script how to compare percentage value in shell script how to comment a line in batch script how to install react js conda install requirements.txt example django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient? install cocoapods Please install all available updates for your release before upgrading. install tor browser ubuntu install psycopg2 ubuntu install npm ubuntu vim ubuntu install how to pip install in folder how to install react router dom with typescript install cmake ubuntu how to install pip2 in kali linux pip command to install xlrd version 1.2.0 install grunt mac install zlib ubuntu sudo apt-install chrome how to install node modules how to install pygame in ubuntu 20.04 install firebase in react install opencv apt install package chart.js expo install install and use beego easily install tensorrt on colab how to install staruml on ubuntu 18.04 appcenter install mac install cmake anaconda install gromit-mpx to mint lollypop music player install ubuntu install dirsearch npm install dev dependencies only linux install chrome command line pip install pygame vue3 install install gdal ubuntu install vi editor ubuntu dockerfile install vm guest additions ubuntu how to install gatsby with typescript install heroku cli on linux ubuntu skype install install ext-soap how to install chocolatey on windows 10 npm install --global yarn how to install wps office in ubuntu clamav install install docker centos 8 pip command to install yaml 5.1.2 ubuntu install apache mod_proxy install anaconda ubuntu 20.04 install express globally install angular fire install homebrew on mac brew install pgdump how to install .deb file ubuntu install easyadmin-bundle symfony install wine ubuntu 20.04 yarn install gyp error npm install install gcc on command prompt install flask on ubuntu install exact version npm install .deb files in terminal linux pip install lightgbm install docker on ubuntu 18.04 install elastic search ubuntu how to install pip in anaconda scikit-learn install error choco install python angular cli install ubuntu install composer mac Install ansible in alpine linux django install requirements git install on alpine install opera ubuntu terminal command install @ng-bootstrap/[email protected] pip install opencv woeusb ubuntu install install jupyter ubuntu install openjdk 8 source apt-get install how to install pip in kali linux install docker on centos timeshift install install seaborn npm install Unable to authenticate, need: Bearer authorization_uri install jupyter homebrew install module to current directory pip install firebase-tools globally yarn how to install docker on ubuntu install php on ubuntu angular install ngx-bootstrap install angular cli version install firewalld ubuntu 20.04 install elasticsearch mongodb install ubuntu install fdupes duplicate content finder on linux install chrome in ubuntu 16.04 using terminal wp cli plugin install install utorrent ubuntu terminal raspberry pi install vscode via command line how to install ns3 in linux the operation was rejected by your operating system npm install install airflow in mac install magento 2 install pgadmin4 in ubuntu kubectl install on ubuntu install firebase npm pip install --upgrade pip3 install from git install npm install atom ubuntu install spotify ubuntu snap how to install helm in ubuntu install livewire laravel docker run npm install express syntax : sudo apt install apache2 ubuntu install brew nuget equivalent of npm install psycopg2 error pip install error install .net core sdk on linux install wsl2 brew install pipenv how to install openai gym in ubuntu cara install laravel enzyme npm install install vscode ubuntu install composer ubuntu 18.04 install brave browser download how to install requirements.txt install docker-compose install gitlab runner on centos install ionic @angular/fire install wheel dotnet install ef how to install homebrew on mac Maatwebsite\Excel\ install laravel apt get install discord dbeaver install ubuntu install docker how to install npm how install xampp in ubuntu vite js install angular 8 install agm ubuntu keepass2 install npm install @ngx-translate/http-loader rpm fusion repo install fedora how to install golang on manjaro install docker in ubuntu pipenv install virtual at same path how to install mongoose globally snap install microsoft teams install realtek rtl88xxau usb wifi driver ubuntu install sailsjs install spectacle brew how to install pytorch 0.4.1 install composer ubuntu install brew linux aos animate install how to install git in ubuntu ? install AdminLTE apt install force install magento 2.4.2 install discord ubuntu install makecert windows 10 pip install webview error sudo gem install cocoapods-deintegrate cocoapods-clean install vim plug neovim mongodb install ubuntu 20.04 install clasp install extension jupyter notebook install node modules from package.json cmd line install team viever install hugo on ubuntu install compser

Browse Other Code Languages

CodeProZone