diff --git a/README.md b/README.md index e83febe..417c26a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Services deployed on [matthewtran.com](https://matthewtran.com). - p2pool (`xmrig -o matthewtran.com`) - minecraft - ~~minecraft bedrock~~ -- ~~terraria~~ +- terraria - nas (`/` on LAN) - wireguard diff --git a/compose.yml b/compose.yml index 4536783..b2d235c 100644 --- a/compose.yml +++ b/compose.yml @@ -109,18 +109,18 @@ services: # - ./minecraft_bedrock/worlds:/home/me/worlds # cap_drop: # - ALL - # terraria: - # restart: always - # build: terraria/. - # entrypoint: ["/bin/sh", "/home/me/entry.sh"] - # ports: - # - "7777:7777" - # networks: - # - game - # volumes: - # - ./terraria/worlds:/home/me/worlds - # cap_drop: - # - ALL + terraria: + restart: always + build: terraria/. + entrypoint: ["/bin/sh", "/home/me/entry.sh"] + ports: + - "7777:7777" + networks: + - game + volumes: + - ./terraria/worlds:/home/me/worlds + cap_drop: + - ALL nas: restart: always build: nas/. diff --git a/terraria/entry.sh b/terraria/entry.sh index 21c986a..68b9b35 100644 --- a/terraria/entry.sh +++ b/terraria/entry.sh @@ -8,7 +8,7 @@ trap 'cleanup' TERM rm cmd mkfifo cmd -./TerrariaServer.bin.x86_64 -config config.txt -pass $(cat password.txt) < cmd & +tail -f cmd | ./TerrariaServer.bin.x86_64 -config config.txt -pass $(cat password.txt) & echo "help\n" > cmd # shell waits for FIFO to be opened for writing before starting program! wait $! # wait for SIGTERM wait $! # wait for server to stop