Automatically spawn and destroy a tf2 server on a schedule
  • Rust 86.7%
  • Nix 13.3%
Find a file
2021-08-09 16:37:53 +02:00
.github/workflows typo 2021-07-31 17:54:18 +02:00
src fix empty server detection and add option to manage existing instances 2021-08-09 16:35:59 +02:00
.dockerignore dockerfile 2021-03-28 20:36:32 +02:00
.gitignore wip 2021-03-27 01:13:11 +01:00
Cargo.lock keep server alive if it has players 2021-08-05 20:07:52 +02:00
Cargo.toml keep server alive if it has players 2021-08-05 20:07:52 +02:00
config.sample.toml fix empty server detection and add option to manage existing instances 2021-08-09 16:35:59 +02:00
Dockerfile no longer depends on openssl 2021-07-31 17:00:46 +02:00
LICENSE Create LICENSE 2021-03-28 18:06:34 +00:00
README.md mention manage_existing in readme 2021-08-09 16:37:53 +02:00

Dispenser

Automatically spawn and destroy a tf2 server on a schedule

Usage

  • Copy config.sample.toml to config.toml and edit accordingly
  • Start dispenser config.toml as a system service

When the configured start schedule is reached it will create a new cloud server, update the dyndns (optional) and install a tf2 server. This server is then destroyed when the stop schedule is reached.

As a failsafe against unexpected costs or destroying the wrong server, this program will not spawn any server if it already detects a running one, and it will only destroy a server that was created by the program.

This does mean that if the program is (re-)started while a server is already active, the program will not start and destroy any server because it can't be sure it should control the running server. You'll need to manually destroy the existing server in that case.

You can overwrite this behavior by setting manage_existing = true in your config.toml,

TODO

  • don't blindly kill server if there are players connected
  • kill the server earlier if everyone disconnected