diff --git a/neoforged/Install_Script.sh b/neoforged/Install_Script.sh index 92164f7..4630f15 100644 --- a/neoforged/Install_Script.sh +++ b/neoforged/Install_Script.sh @@ -58,46 +58,55 @@ 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 + # 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 +# 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 +# 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