screen test
minecraft-build-testing / Docker prune (vm-docker-build2) (push) Successful in 3s
minecraft-build-testing / poll-debian-base-and-detect-changes (push) Successful in 17s
minecraft-build-testing / Build and Push testing (push) Successful in 10s
minecraft-build-testing / generate-changelogs (push) Successful in 7s
minecraft-build-testing / generate-build-info (push) Successful in 11s

This commit is contained in:
2026-07-20 15:25:02 -07:00
parent 269bfb9ee1
commit 7c3bc69336
3 changed files with 30 additions and 20 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ ARG INSTALL_SCRIPT=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/maste
# Install Java & Dependencies. # Install Java & Dependencies.
RUN apt-get -y update \ RUN apt-get -y update \
&& apt-get install -y --no-install-recommends bzip2 lsb-release jq \ && apt-get install -y --no-install-recommends bzip2 lsb-release jq screen \
&& apt-get -y --fix-broken install \ && apt-get -y --fix-broken install \
&& apt-get -y autoclean \ && apt-get -y autoclean \
&& apt-get -y autoremove \ && apt-get -y autoremove \
+28 -18
View File
@@ -16,6 +16,7 @@ EULA_FILE=$MC_DIR/eula.txt
EULA_MARKER=$MC_DIR/.eula_accepted EULA_MARKER=$MC_DIR/.eula_accepted
SERVER_PROPERTIES=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/server.properties SERVER_PROPERTIES=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/server.properties
START_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/testing/start.sh
VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json') VERSION_CHECK=$(curl -s "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json" | grep -Pom 1 '"url": "\K[^"]*'$MC_VERSION'.json')
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url') MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url')
@@ -379,25 +380,33 @@ else
sleep infinity sleep infinity
fi fi
if [ -f /usr/local/bin/rcon-cli.jar ]; then # if [ -f /usr/local/bin/rcon-cli.jar ]; then
echo "INFO ! rcon-cli.jar found ... moving on." # echo "INFO ! rcon-cli.jar found ... moving on."
else # else
echo "INFO ! rcon-cli.jar missing ... downloading now." # echo "INFO ! rcon-cli.jar missing ... downloading now."
wget --no-cache --show-progress --progress=bar:force:noscroll https://github.com/LCLPYT/RconCli/releases/latest/download/rcon-cli.jar -O /usr/local/bin/rcon-cli.jar # wget --no-cache --show-progress --progress=bar:force:noscroll https://github.com/LCLPYT/RconCli/releases/latest/download/rcon-cli.jar -O /usr/local/bin/rcon-cli.jar
fi # fi
if [ -f connect.sh ]; then # if [ -f connect.sh ]; then
echo "INFO ! connect.sh found ... moving on." # echo "INFO ! connect.sh found ... moving on."
else # else
cat > connect.sh <<- "EOF" # cat > connect.sh <<- "EOF"
#!/bin/bash # #!/bin/bash
# Copyright (c) 2026 fithwum # # Copyright (c) 2026 fithwum
# All rights reserved # # All rights reserved
java -jar /usr/local/bin/rcon-cli.jar --host 127.0.0.1 --port "$RCON_PORT" --password "$RCON_PASSWORD" \ # java -jar /usr/local/bin/rcon-cli.jar --host 127.0.0.1 --port "$RCON_PORT" --password "$RCON_PASSWORD" \
"list" # "list"
EOF # EOF
chmod +x connect.sh # chmod +x connect.sh
# fi
if [ -f $MC_DIR/start.sh ]; then
echo "INFO ! start.sh found ... moving on."
else
echo "WARNING ! start.sh missing ... downloading default file."
wget --no-cache --show-progress --progress=bar:force:noscroll $START_FILE -O $MC_DIR/start.sh
chmod +x $MC_DIR/start.sh
fi fi
# Set permissions. # Set permissions.
@@ -410,6 +419,7 @@ sleep 1
echo " " echo " "
echo "INFO ! Starting Minecraft Server $MC_TYPE-$MC_VERSION" echo "INFO ! Starting Minecraft Server $MC_TYPE-$MC_VERSION"
cd $MC_DIR cd $MC_DIR
exec ./run-$MC_TYPE-$MC_VERSION.sh exec ./start.sh
# exec ./run-$MC_TYPE-$MC_VERSION.sh
exit exit
+1 -1
View File
@@ -3,7 +3,7 @@
# All rights reserved # All rights reserved
cd /mcserver cd /mcserver
exec ./run-$MC_TYPE-$MC_VERSION.sh # exec ./run-$MC_TYPE-$MC_VERSION.sh
# Check if a screen session is already running # Check if a screen session is already running
if screen -list | grep -q "mcserver"; then if screen -list | grep -q "mcserver"; then