create fifo for server console access
Gitea/docker-spigot/pipeline/head This commit looks good Details

This commit is contained in:
dave 2022-06-26 11:17:45 -07:00
parent 9ed1147482
commit 75ff24c74b
3 changed files with 6 additions and 2 deletions

2
Jenkinsfile vendored
View File

@ -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) {

View File

@ -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`

5
start
View File

@ -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