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 fabric (push) Successful in 22s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-neoforged (push) Successful in 26s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 26s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 1m14s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 1m15s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 1m1s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 8s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 15s
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 fabric (push) Successful in 22s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-neoforged (push) Successful in 26s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 26s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 1m14s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push neoforged (push) Successful in 1m15s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 1m1s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 8s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 15s
This commit is contained in:
@@ -11,18 +11,6 @@ MC_RUN_FILE=https://gitea.fithwum.tech/fithwum/minecraft/raw/branch/master/neofo
|
||||
|
||||
# Main install (Debian).
|
||||
# Check for server files and download if needed.
|
||||
# if [ -e $MC_DIR/run-$NEOFORGED_VERSION.sh ]
|
||||
# then
|
||||
# echo " "
|
||||
# echo "INFO ! run-$NEOFORGED_VERSION.sh found ... will use existing file."
|
||||
# else
|
||||
# echo " "
|
||||
# echo "WARNING ! run-$NEOFORGED_VERSION.sh is out of date/missing ... will download now."
|
||||
# rm -fr $MC_DIR/run-*.sh
|
||||
# wget --no-cache --show-progress --progress=bar:force:noscroll $MC_RUN_FILE -O $MC_DIR/run-$NEOFORGED_VERSION.sh
|
||||
# chmod +x $MC_DIR/run-$NEOFORGED_VERSION.sh
|
||||
# fi
|
||||
|
||||
if [ -e $MC_DIR/neoforge-$NEOFORGED_VERSION-beta-installer.jar ]
|
||||
then
|
||||
echo " "
|
||||
@@ -42,112 +30,68 @@ if [ -e $MC_DIR/neoforge-$NEOFORGED_VERSION-beta-installer.jar ]
|
||||
cd ..
|
||||
fi
|
||||
|
||||
# if [ -e $MC_DIR/server-$SERVER_VERSION.jar ]
|
||||
# then
|
||||
# echo " "
|
||||
# echo "INFO ! server-$SERVER_VERSION.jar found starting now."
|
||||
# else
|
||||
# echo " "
|
||||
# echo "WARNING ! server-$SERVER_VERSION.jar is out of date/missing ... will download now."
|
||||
# echo " "
|
||||
# echo "INFO ! Cleaning old files."
|
||||
# rm -fr $MC_DIR/server-*.jar
|
||||
# wget --no-cache --show-progress --progress=bar:force:noscroll $SERVER_FILE -O $MC_DIR/server-$SERVER_VERSION.jar
|
||||
# chmod +x $MC_DIR/server-$SERVER_VERSION.jar
|
||||
# fi
|
||||
|
||||
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
|
||||
# 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
|
||||
# if [ ! -f $MC_DIR/eula.txt ]; then
|
||||
# :
|
||||
# else
|
||||
# if [ "$ACCEPT_EULA" == "false" ]; then
|
||||
# if grep -rq 'eula=true' $MC_DIR/eula.txt; then
|
||||
# sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
|
||||
# fi
|
||||
# echo " "
|
||||
# echo "WARNING ! EULA not accepted, you must accept the EULA"
|
||||
# echo " to start the Server, putting server in sleep mode"
|
||||
# sleep infinity
|
||||
# fi
|
||||
# fi
|
||||
if [ ! -f $MC_DIR/eula.txt ]; then
|
||||
:
|
||||
else
|
||||
if [ "$ACCEPT_EULA" == "false" ]; then
|
||||
if grep -rq 'eula=true' $MC_DIR/eula.txt; then
|
||||
sed -i '/eula=true/c\eula=false' $MC_DIR/eula.txt
|
||||
fi
|
||||
echo " "
|
||||
echo "WARNING ! EULA not accepted, you must accept the EULA"
|
||||
echo " to start the Server, putting server in sleep mode"
|
||||
sleep infinity
|
||||
fi
|
||||
fi
|
||||
|
||||
# sleep 1
|
||||
|
||||
# if [ ! -f $MC_DIR/eula.txt ]; then
|
||||
# echo " "
|
||||
# echo "WARNING ! EULA not found please stand by..."
|
||||
# sleep 5
|
||||
# fi
|
||||
# if [ "$ACCEPT_EULA" == "true" ]; then
|
||||
# if grep -rq 'eula=false' $MC_DIR/eula.txt; then
|
||||
# sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
|
||||
# echo " "
|
||||
# echo "INFO ! EULA accepted, server restarting, please wait..."
|
||||
# sleep 1
|
||||
# exec .$MC_DIR/run-$NEOFORGED_VERSION.sh #--dataPath=$MC_DIR
|
||||
# exit 0
|
||||
# fi
|
||||
# elif [ "$ACCEPT_EULA" == "false" ]; then
|
||||
# echo " "
|
||||
# echo "WARNING ! EULA not accepted, you must accept the EULA"
|
||||
# echo " to start the Server, putting server in sleep mode"
|
||||
# sleep infinity
|
||||
# else
|
||||
# echo " "
|
||||
# echo "WARNING ! Something went wrong, please check EULA variable"
|
||||
# fi
|
||||
|
||||
sleep 1
|
||||
if [ ! -f $MC_DIR/eula.txt ]; then
|
||||
echo " "
|
||||
echo "WARNING ! EULA not found please stand by..."
|
||||
sleep 5
|
||||
fi
|
||||
if [ "$ACCEPT_EULA" == "true" ]; then
|
||||
if grep -rq 'eula=false' $MC_DIR/eula.txt; then
|
||||
sed -i '/eula=false/c\eula=true' $MC_DIR/eula.txt
|
||||
echo " "
|
||||
echo "INFO ! EULA accepted, server restarting, please wait..."
|
||||
sleep 1
|
||||
exec .$MC_DIR/run-$NEOFORGED_VERSION.sh #--dataPath=$MC_DIR
|
||||
exit 0
|
||||
fi
|
||||
elif [ "$ACCEPT_EULA" == "false" ]; then
|
||||
echo " "
|
||||
echo "WARNING ! EULA not accepted, you must accept the EULA"
|
||||
echo " to start the Server, putting server in sleep mode"
|
||||
sleep infinity
|
||||
else
|
||||
echo " "
|
||||
echo "WARNING ! Something went wrong, please check EULA variable"
|
||||
fi
|
||||
|
||||
echo "INFO ! Setting game port."
|
||||
# sed -i '/server-port='*'/c\server-port='$GAME_PORT'' $MC_DIR/server.properties
|
||||
|
||||
if [ -f server.properties ]; then
|
||||
sed -i '/server-port='*'/c\server-port='$GAME_PORT'' $MC_DIR/server.properties
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "INFO ! Setting java settings."
|
||||
# sed -i '/-Xmx='*'/c\-Xmx='$XMX_SIZE'' $MC_DIR/user_jvm_args.txt
|
||||
# sed -i '/-Xms='*'/c\-Xms='$XMS_SIZE'' $MC_DIR/user_jvm_args.txt
|
||||
# sed -i '/-Xmn='*'/c\-Xmn='$XMN_SIZE'' $MC_DIR/user_jvm_args.txt
|
||||
|
||||
# if [ ! -f $MC_DIR/user_jvm_args.txt ]; then
|
||||
# echo "Creating user_jvm_args.txt"
|
||||
# {
|
||||
# echo "-Xms$XMS_SIZE"
|
||||
# echo "-Xmx$XMX_SIZE"
|
||||
# [ -n "$XMN_SIZE" ] && echo "-Xmn$XMN_SIZE"
|
||||
# } > $MC_DIR/user_jvm_args.txt
|
||||
# else
|
||||
# sed -i "s/^-Xms.*/-Xms$XMS_SIZE/" $MC_DIR/user_jvm_args.txt
|
||||
# sed -i "s/^-Xmx.*/-Xmx$XMX_SIZE/" $MC_DIR/user_jvm_args.txt
|
||||
# if [ -n "$XMN_SIZE" ]; then
|
||||
# sed -i "s/^-Xmn.*/-Xmn$XMN_SIZE/" $MC_DIR/user_jvm_args.txt || true
|
||||
# fi
|
||||
# fi
|
||||
|
||||
cat > $MC_DIR/user_jvm_args.txt <<EOF
|
||||
-Xms${XMS_SIZE}
|
||||
-Xmx${XMX_SIZE}
|
||||
EOF
|
||||
|
||||
[ -n "$XMN_SIZE" ] && echo "-Xmn${XMN_SIZE}" >> $MC_DIR/user_jvm_args.txt
|
||||
|
||||
sleep 1
|
||||
|
||||
# Set permissions.
|
||||
chown 99:100 -R $MC_DIR
|
||||
chmod 777 -R $MC_DIR
|
||||
|
||||
Reference in New Issue
Block a user