From f7d82e0bbf6721e16d3bbdae639fca998cc533af Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 19 Aug 2016 16:52:27 +0100 Subject: [PATCH] EULA --- lgsm/functions/install_minecraft_eula.sh | 31 ++++++++++++++++++++++++ lgsm/functions/install_server_files.sh | 1 + 2 files changed, 32 insertions(+) create mode 100644 lgsm/functions/install_minecraft_eula.sh diff --git a/lgsm/functions/install_minecraft_eula.sh b/lgsm/functions/install_minecraft_eula.sh new file mode 100644 index 000000000..a95fe8e1d --- /dev/null +++ b/lgsm/functions/install_minecraft_eula.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# LGSM install_minecraft_eula.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Gets user to accept the EULA. + +echo "" +echo "Accept ${gamename} EULA" +echo "=================================" +sleep 1 +echo "You are required to accept the EULA:" +echo "https://account.mojang.com/documents/minecraft_eula" + +if [ -z "${autoinstall}" ]; then +echo "By continuing you are indicating your agreement to the EULA." +echo "" + while true; do + read -e -i "y" -p "Continue [Y/n]" yn + case $yn in + [Yy]* ) break;; + [Nn]* ) core_exit.sh;; + * ) echo "Please answer yes or no.";; + esac + done +else +echo "By using auto-install you are indicating your agreement to the EULA." +echo "" + sleep 5 +fi + +sed -i "s/\"eula=false\"/\"eula=true\"/g" serverfiles/eula.txt \ No newline at end of file diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 0fd5a63ac..9c9604253 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -97,6 +97,7 @@ if [ "${gamename}" == "TeamSpeak 3" ]; then update_ts3.sh elif [ "${gamename}" == "Minecraft" ]; then update_minecraft.sh + install_minecraft_eula.sh elif [ "${gamename}" == "Mumble" ]; then update_mumble.sh elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then