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.
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 autoclean \
&& apt-get -y autoremove \
+28 -18
View File
@@ -16,6 +16,7 @@ EULA_FILE=$MC_DIR/eula.txt
EULA_MARKER=$MC_DIR/.eula_accepted
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')
MC_SERVER_FILE=$(curl -s $VERSION_CHECK | jq --raw-output '.downloads.server.url')
@@ -379,25 +380,33 @@ else
sleep infinity
fi
if [ -f /usr/local/bin/rcon-cli.jar ]; then
echo "INFO ! rcon-cli.jar found ... moving on."
else
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
fi
# if [ -f /usr/local/bin/rcon-cli.jar ]; then
# echo "INFO ! rcon-cli.jar found ... moving on."
# else
# 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
# fi
if [ -f connect.sh ]; then
echo "INFO ! connect.sh found ... moving on."
else
cat > connect.sh <<- "EOF"
#!/bin/bash
# Copyright (c) 2026 fithwum
# All rights reserved
# if [ -f connect.sh ]; then
# echo "INFO ! connect.sh found ... moving on."
# else
# cat > connect.sh <<- "EOF"
# #!/bin/bash
# # Copyright (c) 2026 fithwum
# # All rights reserved
java -jar /usr/local/bin/rcon-cli.jar --host 127.0.0.1 --port "$RCON_PORT" --password "$RCON_PASSWORD" \
"list"
EOF
chmod +x connect.sh
# java -jar /usr/local/bin/rcon-cli.jar --host 127.0.0.1 --port "$RCON_PORT" --password "$RCON_PASSWORD" \
# "list"
# EOF
# 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
# Set permissions.
@@ -410,6 +419,7 @@ sleep 1
echo " "
echo "INFO ! Starting Minecraft Server $MC_TYPE-$MC_VERSION"
cd $MC_DIR
exec ./run-$MC_TYPE-$MC_VERSION.sh
exec ./start.sh
# exec ./run-$MC_TYPE-$MC_VERSION.sh
exit
+1 -1
View File
@@ -3,7 +3,7 @@
# All rights reserved
cd /mcserver
exec ./run-$MC_TYPE-$MC_VERSION.sh
# exec ./run-$MC_TYPE-$MC_VERSION.sh
# Check if a screen session is already running
if screen -list | grep -q "mcserver"; then