Topic: teeman - a bash tool to manage your Teeworlds server(s)
Hellu everyone,
here is teeman, a simple script to manage your Teeworlds servers easily. Made in bash it works on linux.
What can you do with this?
You can start / stop your servers easily, get some informations such as the runtime, number of players in game, etc ...
Some examples :
Get some help
test@xxx:~$ teeman help
Usage: teeman [command] [arguments]
Manage Teeworlds servers
teeman start <configuration> - start the server <configuration>
teeman stop <configuration> - stop the server <configuration>
teeman restart <configuration> - restart the server <configuration>
teeman status <configuration> - get the status of the server <configuration>
teeman fullstatus <configuration> - get the fullstatus of the server <configuration>
teeman list - list all the configurations
If no specific configuration file is given the command applies to all configuration files.
Configuration directory: /home/test/teeman/configuration
Start a server with the configuration my_ctf.conf
test@xxx:~$ teeman start my_ctf
my_ctf started (pid 26787)
Start all the configurations
test@xxx:~$ teeman start
my_ctf started (pid 20775)
ddr.my_srv started (pid 20797)
Stop a specific configuration
test@xxx:~$ teeman stop my_ctf
my_ctf stopped (pid 20775)
Get the status of all servers
test@xxx:~$ teeman status
my_ctf is running (pid 20775)
ddr.my_srv is running (pid 20797)
Get the fullstatus of a specific server
test@xxx:~$ teeman fullstatus my_ctf
name: my_ctf
configuration: /home/test/teeman/configuration/my_ctf.conf
log: /home/test/teeman/log/my_ctf.log (568K)
state: running (pid 20775)
handler: teeworlds_srv
port: 8304
masterserver: master2.teeworlds.com
gametype: CTF
runtime: 242847s
first start: 2013-11-27 21:44:35
last start: 2013-11-28 23:25:25
current players: 0
all time players: 132
Display the list of configurations
test@xxx:~$ teeman list
my_ctf
ddr.my_srv
First you need to download the script on my repository
Follow the INSTALLATION section, it's quite fast, don't worry.
Once you have followed the procedure, just write down your configuration files in this folder ~/teeman/configurations
You must put the suffix .conf to each file, so they will be proceed by teeman.
Let's say you created the configuration test.conf, so you can start it this way :
test@xxx:~$ teeman start test
It also can work with MODs, for this it uses a system called hanlders. It's just a text file which defines rules. These rules tell which binary to call with which name.
For example with this in your handlers file:
# rule name ; prefix ; binary file
my ddrace rule;ddr;DDRace
All the configuration files starting with ddr. will be started by the DDRace binary. It's quite handy when you call teeman start alone, it runs all your configurations with the good binary.
I suggest your read the HANDLERS section of the README to get started with it.
Thanks for reading me.
Do not hesitate to give me feedback, critics, ideas of improvements etc ...
P.S: I tried it, but few bugs could come up, so I still consider it as BETA for now.
<3