update
This commit is contained in:
@@ -14,6 +14,10 @@ MC_VERSION=1.19.3
|
|||||||
FORGE_VERSION=44.1.0
|
FORGE_VERSION=44.1.0
|
||||||
MC_SERVER_FILE=https://maven.minecraftforge.net/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-installer.jar
|
MC_SERVER_FILE=https://maven.minecraftforge.net/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-installer.jar
|
||||||
MC_RUN_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/run.sh
|
MC_RUN_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/run.sh
|
||||||
|
EULA_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/eula.txt
|
||||||
|
OPS_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/ops.json
|
||||||
|
WHITELIST_FILE=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/whitelist.json
|
||||||
|
SERVER_PROPERTIES=https://raw.githubusercontent.com/fithwum/minecraft/master/forge/forge-${MC_VERSION}/files/server.properties
|
||||||
|
|
||||||
# Main install (Debian).
|
# Main install (Debian).
|
||||||
# Check for files in /MCserver and download if needed.
|
# Check for files in /MCserver and download if needed.
|
||||||
@@ -50,45 +54,45 @@ fi
|
|||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# Check for EULA
|
# Check for needed files
|
||||||
if [ ! -f /MCserver/eula.txt ]; then
|
if [ -e /MCserver/${EULA_FILE} ]
|
||||||
:
|
then
|
||||||
else
|
|
||||||
if [ "${ACCEPT_EULA}" == "false" ]; then
|
|
||||||
if grep -rq 'eula=true' /MCserver/eula.txt; then
|
|
||||||
sed -i '/eula=true/c\eula=false' /MCserver/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 /MCserver/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' /MCserver/eula.txt; then
|
|
||||||
sed -i '/eula=false/c\eula=true' /MCserver/eula.txt
|
|
||||||
echo " "
|
echo " "
|
||||||
echo "INFO ! EULA accepted, server restarting, please wait..."
|
echo "INFO ! eula.txt found ... will use existing file."
|
||||||
sleep 1
|
else
|
||||||
exec /MCserver/run_${MC_VERSION}.sh --dataPath=/MCserver
|
echo " "
|
||||||
exit 0
|
echo "WARNING ! eula.txt is missing ... will download now."
|
||||||
fi
|
wget --no-cache ${EULA_FILE} -O /MCserver/eula.txt
|
||||||
elif [ "${ACCEPT_EULA}" == "false" ]; then
|
fi
|
||||||
echo " "
|
|
||||||
echo "WARNING ! EULA not accepted, you must accept the EULA"
|
if [ -e /MCserver/${OPS_FILE} ]
|
||||||
echo " to start the Server, putting server in sleep mode"
|
then
|
||||||
sleep infinity
|
echo " "
|
||||||
else
|
echo "INFO ! ops.json found ... will use existing file."
|
||||||
echo " "
|
else
|
||||||
echo "WARNING ! Something went wrong, please check EULA variable"
|
echo " "
|
||||||
|
echo "WARNING ! ops.json is missing ... will download now."
|
||||||
|
wget --no-cache ${OPS_FILE} -O /MCserver/ops.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e /MCserver/${WHITELIST_FILE} ]
|
||||||
|
then
|
||||||
|
echo " "
|
||||||
|
echo "INFO ! whitelist.json found ... will use existing file."
|
||||||
|
else
|
||||||
|
echo " "
|
||||||
|
echo "WARNING ! whitelist.json is missing ... will download now."
|
||||||
|
wget --no-cache ${WHITELIST_FILE} -O /MCserver/whitelist.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e /MCserver/${SERVER_PROPERTIES} ]
|
||||||
|
then
|
||||||
|
echo " "
|
||||||
|
echo "INFO ! server.properties found ... will use existing file."
|
||||||
|
else
|
||||||
|
echo " "
|
||||||
|
echo "WARNING ! server.properties is missing ... will download now."
|
||||||
|
wget --no-cache ${SERVER_PROPERTIES} -O /MCserver/server.properties
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Reference in New Issue
Block a user