test
All checks were successful
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 10s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-neoforged (push) Successful in 1m18s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 1m19s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 1m20s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 1m30s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 57s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 58s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 9s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 50s

This commit is contained in:
2025-12-18 08:55:56 -08:00
parent aa8a8a625d
commit b7c14962a4

View File

@@ -58,46 +58,55 @@ fi
sleep 1 sleep 1
# ---- EULA handling ----
if [ "${ACCEPT_EULA:-false}" = "true" ]; then
echo "eula=true" > eula.txt
else
echo "eula=false" > eula.txt
echo "EULA not accepted. Set ACCEPT_EULA=true to start the server."
sleep infinity
fi
# Check for EULA # Check for EULA
if [ ! -f $MC_DIR/eula.txt ]; then # if [ ! -f $MC_DIR/eula.txt ]; then
: # :
else # else
if [ "$ACCEPT_EULA" == "false" ]; then # if [ "$ACCEPT_EULA" == "false" ]; then
if grep -rq 'eula=true' $MC_DIR/eula.txt; then # if grep -rq 'eula=true' $MC_DIR/eula.txt; then
sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt # sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
fi # fi
echo " " # echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA" # echo "WARNING ! EULA not accepted, you must accept the EULA"
echo " to start the Server, putting server in sleep mode" # echo " to start the Server, putting server in sleep mode"
sleep infinity # sleep infinity
fi # fi
fi # fi
sleep 1 # sleep 1
if [ ! -f $MC_DIR/eula.txt ]; then # if [ ! -f $MC_DIR/eula.txt ]; then
echo " " # echo " "
echo "WARNING ! EULA not found please stand by..." # echo "WARNING ! EULA not found please stand by..."
sleep 5 # sleep 5
fi # fi
if [ "$ACCEPT_EULA" == "true" ]; then # if [ "$ACCEPT_EULA" == "true" ]; then
if grep -rq 'eula=false' $MC_DIR/eula.txt; then # if grep -rq 'eula=false' $MC_DIR/eula.txt; then
sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt # sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
echo " " # echo " "
echo "INFO ! EULA accepted, server restarting, please wait..." # echo "INFO ! EULA accepted, server restarting, please wait..."
sleep 1 # sleep 1
exec .$MC_DIR/run-$NEOFORGED_VERSION.sh #--dataPath=$MC_DIR # exec .$MC_DIR/run-$NEOFORGED_VERSION.sh #--dataPath=$MC_DIR
exit 0 # exit 0
fi # fi
elif [ "$ACCEPT_EULA" == "false" ]; then # elif [ "$ACCEPT_EULA" == "false" ]; then
echo " " # echo " "
echo "WARNING ! EULA not accepted, you must accept the EULA" # echo "WARNING ! EULA not accepted, you must accept the EULA"
echo " to start the Server, putting server in sleep mode" # echo " to start the Server, putting server in sleep mode"
sleep infinity # sleep infinity
else # else
echo " " # echo " "
echo "WARNING ! Something went wrong, please check EULA variable" # echo "WARNING ! Something went wrong, please check EULA variable"
fi # fi
sleep 1 sleep 1