Results 1 to 15 of 18
-
07-01-2010, 08:37 #1
-= TeamSpeak User =-
- Join Date
- Jan 2010
- Location
- Arizona
- Posts
- 4
Linux TS3 Server Autostart script
Edit by mod
Please don't use this outdated script anymore! The script got an overhaul long time ago.
Please use the minimal or startscript instead
ADMINS you may want to sticky this topic!!
This will work on Centos, Red Hat, and is untested but should work on Fedora and any RHEL(Red Hat Enterprise Linux) compatible system.
here we go guys, this script will kick TS3 into action at server start automatically.
This script will register TS3 as a Linux System Service so that it starts and stops automatically with the systems startup and shutdown, and i have it working wonderfully with the Teamspeak 3 webadmin from HobbitNoob(http://forum.teamspeak.com/showthread.php?t=48395)
first make sure to change the line
cd teamspeak3-server_linux-amd64
to match the folder where "ts3server_linux_amd64" or your architectures starter file is located!
if needed also edit the following line for machines that are not 64bit
nohup ./ts3server_linux_amd64 &
save that as filename "ts3" into your servers "/etc/rc.d/init.d" path!Code:#! /bin/sh # Basic support for IRIX style chkconfig ### # chkconfig: 2345 98 55 # description: Manages the services you are controlling with the chkconfig command ### case "$1" in start) echo -n "Starting ts3" cd teamspeak3-server_linux-amd64 nohup ./ts3server_linux_amd64 & echo "." ;; stop) echo -n "Stopping ts3" pkill ts3server_linux echo "." ;; *) echo "Usage: /sbin/service ts3 {start|stop}" exit 1 esac exit 0
make sure root owns the file
chmod it to 777
change to the "/etc/rc.d/init.d" directory and run the following commands!
sudo chkconfig --add ts3
sudo chkconfig --level 2345 ts3 on
service ts3 start
now if done correctly TS3 will autostart at system boot.
after this is installed you can do the following commands to start or stop the TS3 daemon manually
service ts3 stop
or
service ts3 startLast edited by dante696; 21-02-2011 at 12:11.
-
07-01-2010, 09:05 #2
-= TeamSpeak User =-
- Join Date
- Jan 2010
- Location
- Arizona
- Posts
- 4
HobbitNoobs webadmin is a pain to setup for the first time because the documentation is a bit dry, this config will work for almost any server provided TS3 is running on the same box as it is.
With your TS3 client connected to your server use the serveradmin token it gave you, MENU > PERMISSIONS > USE TOKEN!Code:<?php define("TSADMINHOST", "127.0.0.1"); define("TSADMINPORT", "10011"); define("LANG","en"); // Language for the webadmin define("THEME", "standard"); // path for theme in theme folder define("LIVE", TRUE); // Check for new Server Update define("NEWS", TRUE); // Fetch developer Blog news define("FIXLOGINUSER", FALSE); // Standart Login "serveradmin" readonly on true define("COMENT", FALSE); define("HOLDONERROR", TRUE); // Hold on if an error exist define("NEWSSERVER", "http://ts3interface.de/news"); // Don't change these lines define("INCDIR", "inc/"); require("lang/".LANG.".inc.php"); require(ROOTDIR.INCDIR."functions.inc.php"); require(ROOTDIR.INCDIR."ts3admin.class.php"); $tsAdmin = &new ts3admin(TSADMINHOST, TSADMINPORT); $tsAdmin->connect(); ?>
Then go to
MENU > PERMISSIONS > SERVERQUERY LOGIN!
Set your webadmin username, and it will give you a random password!
now just login to the webadmin!
-
07-01-2010, 13:17 #3
-= TeamSpeak User =-
- Join Date
- Dec 2009
- Location
- Netherlands
- Posts
- 25
your script cannot handle options or ini specifications so only users with basic settings can use it.
Take a look at this: http://forum.teamspeak.com/showthread.php?t=47763
You might like it. Why do you run it as root? That's not wise, adding something as a service will run as root standard.
-
07-01-2010, 23:35 #4
-= TeamSpeak User =-
- Join Date
- Jan 2010
- Location
- Arizona
- Posts
- 4
my script is simple and easy for those new to linux to figure out.
and with properly installed iptables, the risk of running it as root is neglidgable.
also people who do know linux can simple change 1 line to add "sudo" and run it as any user they want.
on a server with gameservers, ts and many other things running, i dont feel like having to go into putty or the local terminal to start a voip server!
with this script its done for you!
Also any server used in production that requires manual startup of any regularly used service is just a poor technical practice!
if the server reboots with my script in place, rather than having to find out TS3 is down and shell in to start it, it will always just start itself, the box boots and does everything autonomously!
How do you think the paid providers do things, do you really think every time a server reboots they have someone remote in to start TS3 or other daemons?
NOPE, they have it setup just like mine!
You also dont have to remember exactly where TS3 is installed since its registered as a service linux knows where it is, just from any folder you can do service ts3 (stop/start) when you need to manually do anything!
-
20-04-2010, 14:15 #5
-= TeamSpeak User =-
- Join Date
- Apr 2010
- Location
- Germany
- Posts
- 1
how to integrate "respawn"
how to integrate "respawn", so the server starts again when the process is killed or terminated? i don't want to use a cronjob for this because its to unflexible..
thx for help
Last edited by badguy2003st; 20-04-2010 at 20:54.
-
31-07-2010, 14:33 #6
-= TeamSpeak User =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 19
does the script work under ubuntu?
How can i start under a different user?
-
31-07-2010, 22:50 #7
-= TeamSpeak Addict =-
- Join Date
- Aug 2008
- Location
- Whois
- Posts
- 597
sorry but this script is superfluously use cron!
http://en.wikipedia.org/wiki/Cron
http://de.wikipedia.org/wiki/Cron
-
02-08-2010, 14:12 #8
-= TeamSpeak User =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 19
i'm a noob with linux
-
02-08-2010, 15:49 #9
-= TeamSpeak Addict =-
- Join Date
- Aug 2008
- Location
- Whois
- Posts
- 597
Create a easy Script named: ts3_check.sh ( chmod 777 )
next step:Code:#!/bin/sh ps ax | grep -v "grep ts3server_linux_x86" | grep ts3server_linux_x86 || /home/teamspeak3/ts3server_linux_x86
( edit the red marked text for you own configuration! )Code:crontab -e and insert the following lines: 30 0 * * * /home/teamspeak3/ts3_check.sh
Finished...
Oh my gosh! Google helps me!
http://www.webmaster-toolkit.com/cron-generator.shtml
-
20-10-2010, 16:26 #10
-= TeamSpeak User =-
- Join Date
- Oct 2010
- Location
- UK
- Posts
- 1
I hope you don't mind but I've made a small change to the script. For those who do not want to run as root. you can just do the follow:
You'll just need to change the path and what user it runs as. Mine is running as user tsCode:#! /bin/sh # Basic support for IRIX style chkconfig ### # chkconfig: 2345 98 55 # description: Manages the services you are controlling with the chkconfig command ### case "$1" in start) echo -n "Starting ts3" sudo -u ts /home/ts/teamspeak3-server_linux-amd64/./ts3server_startscript.sh start ;; stop) echo -n "Stopping ts3" sudo -u ts /home/ts/teamspeak3-server_linux-amd64/./ts3server_startscript.sh stop ;; *) echo "Usage: /sbin/service ts3 {start|stop}" exit 1 esac exit 0
all you need to do is change the
sudo -u username
and the path to where your ts3 is installed. just make sure you change it in the stop and the start command.Last edited by PooKer; 20-10-2010 at 16:27. Reason: changed quotes into codes
-
23-10-2010, 02:05 #11
hello iam beginner in ssh and linux, my server working in
/root/teamspeak3
i fallow everysteps in installation.
http://img403.imageshack.us/img403/6749/capturets.png
i got error like that.
-
23-10-2010, 09:22 #12
-= TeamSpeak User =-
- Join Date
- Jun 2010
- Location
- Germany
- Posts
- 28
congratulations you just created a privilege escalation exploit on your system.
NEVER EVER set a rc file to world-writeable. anyone on your system could change the file, to install rootkits or other stuff and then just wait until the machine gets rebootet the next time to have the code executed as root.
should do fine.Code:chown root:root <file> chmod 755 <file>
-
28-10-2010, 16:40 #13
-= TeamSpeak User =-
- Join Date
- Oct 2010
- Location
- Poland
- Posts
- 8
Code:$ crontab -e
done...Code:reboot /home/teamspeak3/ts3server_startscript.sh restart
-
07-08-2011, 00:59 #14
-= TeamSpeak User =-
- Join Date
- Mar 2011
- Posts
- 1
Dummy Needs help fedora linux VM server, which we run a ts3 server on
we have a fedora linux VM server, which we run a ts3 server on... The software is installed here "... include folder path)" and it runs under this account... exactly how do you create a script file that will run the ts3 script when the server boots
-
07-08-2011, 10:23 #15
-= TeamSpeak Lover =-
- Join Date
- Jan 2010
- Location
- Germany
- Posts
- 83
Just add a crontab:
@reboot ./ tsstartscript...
You have to enter the right path and name for the script
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Perma Ban
By madscotslad in forum Client SupportReplies: 9Last Post: 10-07-2010, 02:34 -
Help! install ts3
By Shiwa in forum Linux / FreeBSDReplies: 3Last Post: 04-01-2010, 19:50 -
Noob linux server How-To.
By Wubwub in forum [TeamSpeak 2] Server SupportReplies: 24Last Post: 02-11-2007, 02:37 -
Friends can't connect
By shadow127 in forum [TeamSpeak 2] Server SupportReplies: 86Last Post: 01-01-2006, 20:45 -
How to make a script autostart ts server?
By <BvS> Vetal in forum [TeamSpeak 2] Server SupportReplies: 2Last Post: 13-06-2005, 11:00


Reply With Quote

