From 75ff24c74b321c0732c4a8b7e51a61dc0930faf0 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 26 Jun 2022 11:17:45 -0700 Subject: [PATCH] create fifo for server console access --- Jenkinsfile | 2 +- README.md | 1 + start | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dd11c96..d769b31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ spec: script { try { docker.withRegistry('http://dockermirror:5000') { - docker.image("ubuntu:focal").pull() + docker.image("ubuntu:jammy").pull() docker.image(image_name).pull() // Pull a recent version to share base layers with (?) } } catch (exc) { diff --git a/README.md b/README.md index afed0aa..5189228 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,4 @@ Mount `/srv/spigot/` to the host. This dir should be owned by UID 1000: ## Protips * Memory limit: `-e MEMLIMIT=512m`. Defaults to 1024m. +* Send commands to the server console: `$ echo "kick xMopx" > /srv/spigot/stdin` diff --git a/start b/start index 279eb10..ea6d2b7 100755 --- a/start +++ b/start @@ -8,4 +8,7 @@ test ! -f /srv/spigot/eula.txt && cp /srv/spigot-default/eula.txt /srv/spigot/ cd /srv/spigot/ -exec java -Xmx$MEMLIMIT $JAVAARGS -jar spigot.jar --nojline $@ +rm -f stdin +mkfifo stdin + +exec java -Xmx$MEMLIMIT $JAVAARGS -jar spigot.jar --nojline $@ <> ./stdin