I searched a howto for TeamSpeak with SME server and didn't find a complete howto...
So, i'm just putting together a lot of stuff founded in several posts
Here's one who worked for me...
I've tested it on a SME 6.0.1-01 and on a SME 7.0 final install and it works very well... As i'm quite new and noob with SME, i didn't tested it on other versions...
First of all, download ts2_server_rc2_20201.tar.bz2 (latest stable)
herethen, make a file called teamspeak with that : (cut+paste)
#! /bin/bash
# Copyright (c) 2004 TeamSpeak team All rights reserved.
#
# Author: pwk.linuxfan 2004
# Modified by Derek "Cybernaut" Jackson - www.DigitalNines.com
#
# chkconfig: 345 85 15
# description: Runs and kills TeamSpeak Voice server at boot time and shutdown.
# Source function library.
#. /etc/rc.d/init.d/functions
# START OF CONFIG SECTION
# WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT
USER=teamspeak
DIR=/home/teamspeak/tss2_rc2
# END OF CONFIG SECTION
# See how we were called.
case "$1" in
start)
if [ -e $DIR/tsserver2.pid ]; then
echo "tsserver2.pid already exists...server already started ?";
echo "If you are sure the server is not running, delete tsserver2.pid"
exit 1
else
if [ "$UID" = "0" ]; then
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo !
fi
echo "Starting the TeamSpeak Voice server..."
if [ -e $DIR/server_linux ]; then
if [ ! -x $DIR/server_linux ]; then
echo "server_linux is not executable; trying to set it."
chmod u+x $DIR/server_linux
fi
if [ -x $DIR/server_linux ]; then
WD=pwd
cd $DIR
su $USER -c "$DIR/server_linux -PID=tsserver2.pid" &
cd $WD
else
echo "server_linux is not executable; fix this."
exit 4
fi
else
echo "Couldnt find server_linux."
exit 5
fi
fi
;;
stop)
if [ -e $DIR/tsserver2.pid ]; then
echo -n "Stopping the TeamSpeak Voice server..."
if ( kill -TERM cat $DIR/tsserver2.pid ); then
for c in $(seq 1 300); do
if [ -e $DIR/tsserver2.pid ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e $DIR/tsserver2.pid ]; then
echo "server does not shutdown cleanly - killing"
kill -KILL cat $DIR/tsserver2.pid
rm $DIR/tsserver2.pid
sleep 5
else
echo "done"
fi
else
echo "tsserver2.pid is missing; is the server stopped already?"
#exit 7 - Should not be here as doesn't allow restart if server is already stopped.
fi
;;
restart)
$0 stop && $0 start || exit 1
;;
status)
if [ -e $DIR/tsserver2.pid ]; then
echo "The TeamSpeak Voice server is running."
exit 0
else
echo "The TeamSpeak Voice server is stopped."
exit 3
fi
;;
passwords)
if [ -e $DIR/server.log ]; then
date=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^\([0-9]\+-[0-9]\+-[0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+\).*$/\1/")
spass=$(cat $DIR/server.log | grep "superadmin account info: username: superadmin" | tail -n 1 | sed"s/^.*username: superadmin password: \([a-z0-9]\+\).*$/\1/")
pass=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^.*username: admin password: \([a-z0-9]\+\).*$/\1/")
echo "Following passwords were generated on $date"
echo "superadmin = \"$spass\""
echo "admin = \"$pass\""
else
echo "server.log not found; maybe the server has not been started yet?"
exit 1
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status|passwords}"
exit 2
esac
exit 0
Don't modify this file untill you know what you're doing... That's how TS starts and stop !!!
I saved all the files (this one + the downloaded package) in /root/addons/tss2 so you have to modify the following to feet your needs !
echo "Installation de TeamSpeak Server 2 RC2"
useradd -d /home/teamspeak teamspeak -p your_teamspeak_password_here
cp /root/addons/tss2/ts2_server_rc2_20201.tar.bz2 /home/teamspeak/ts2_server_rc2_20201.tar.bz2
cd /home/teamspeak
tar -xjf ts2_server_rc2_20201.tar.bz2
rm ts2_server_rc2_20201.tar.bz2
cp /root/addons/tss2/teamspeak /etc/init.d/teamspeak
chmod 755 /etc/init.d/teamspeak
ln -s /etc/rc.d/init.d/teamspeak /etc/rc.d/rc7.d/S98teamspeak
ln -s /etc/rc.d/init.d/teamspeak /etc/rc.d/rc6.d/K03teamspeak
cd /home/teamspeak/tss2_rc2
./teamspeak2-server_startscript start
sleep 2
./teamspeak2-server_startscript stop
cd /home/teamspeak
chown teamspeak:teamspeak * -R
service teamspeak start
# echo "/sbin/iptables --append INPUT -p udp --dport 8767 -i \$OUTERIF -j ACCEPT" > /etc/e-smith/templates/etc/rc.d/init.d/masq/42AllowTS
# /sbin/e-smith/expand-template /etc/rc.d/init.d/masq
A user called teamspeak is created (change his password in the script !)
Don't mind of the root warning during installation, it's a way to fix a problem during installation, the start script is first started with root rights, then it shutdowns, change owner and then start the service with the good user !
If you server is in gateway+server mode, then you have to uncomment the last 2 lines (not tested on both versions of SME, but seen on another forum) to open open port 8767UDP... If as me you're in server-only mode, just redirect port 8767UDP from the firewall/nat to your server's IP
After installation, just open /home/teamspeak/tss2_rc2/server.log with your favorite text editor and grab the admin and superadmin passwords (radomly generated at the install stage)
Then, go to
http://yourserver:14534 to configure the few settings in the web interface... And connect to it with the client, all should be working !
TeamSpeak client is available for all platforms...