Skip to content

Instantly share code, notes, and snippets.

@itsrachelfish
Created November 16, 2018 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsrachelfish/4dee8a3f937f462665ea220e7d993e6e to your computer and use it in GitHub Desktop.
Save itsrachelfish/4dee8a3f937f462665ea220e7d993e6e to your computer and use it in GitHub Desktop.
Teeworlds startup script

Teeworlds server config

Directory structure

- server/
  - config/
    - enabled/
    - disabled/
  - binaries/
  - start.sh

server/ is the main project folder for the teeworlds server repo, config/ is for all of the configuration files, and binaries/ is for all of the actual server code / compiled binaries.

The contents of binaries/ should be gitignored.

Start command

./start.sh [--help, -h] [--version, -v] [--config, -c]
  • No args, --help: output help message
  • --version [version string]: control which version of teeworlds is used (version strings like '0.6.5', '0.6.4', 'fng' would correspond to the name of the folders within binaries/)
  • --version all: loops through all available versions in binaries/
  • --config [config file]: loads a custom config file from config/
  • --config all: loads all available config files in config/enabled/ and starts a server for each

Other notes

  • Different gamemodes like DDNet / FNG use different commands to start a server, so it might be necessary to keep a list of server binary names and check if they exist in a folder.
    • For example: teeworlds-server, DDNet-server, openfng_srv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment