Просмотр исходного кода

Merged feature/UnrealTournament-Server-XAN-3193528 into develop

Daniel Gibbs 9 лет назад
Родитель
Сommit
e30e08730e

+ 5 - 0
lgsm/functions/core_functions.sh

@@ -510,6 +510,11 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
+install_unreal_tournament_eula.sh(){
+functionfile="${FUNCNAME}"
+fn_fetch_function
+}
+
 install_retry.sh(){
 functionfile="${FUNCNAME}"
 fn_fetch_function

+ 5 - 2
lgsm/functions/install_server_files.sh

@@ -34,7 +34,7 @@ fn_install_server_files(){
 	elif [ "${gamename}" == "Unreal Tournament 99" ]; then
 		fileurl="http://files.gameservermanagers.com/UnrealTournament99/ut99-server-451-ultimate-linux.tar.bz2"; filedir="${tmpdir}"; filename="ut99-server-451-ultimate-linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="49cb24d0550ff6ddeaba6007045c6edd"
 	elif [ "${gamename}" == "Unreal Tournament" ]; then
-		fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6"
+		fileurl="https://gameservermanagers.com/files/UnrealTournament-Server-Linux-Latest.zip"; filedir="${tmpdir}"; filename="UnrealTournament-Server-Linux-Latest.zip";  executecmd="noexecute" run="norun"; force="noforce"; md5="e3dd5853c4eb193674d5c832f60040d8"
 	elif [ "${gamename}" == "Unreal Tournament 3" ]; then
 		fileurl="http://files.gameservermanagers.com/UnrealTournament3/UT3-linux-server-2.1.tar.bz2"; filedir="${tmpdir}"; filename="UT3-linux-server-2.1.tar.bz2";  executecmd="noexecute" run="norun"; force="noforce"; md5="2527437b46f1b47f20228d27d72395a6"
 	elif [ "${gamename}" == "Wolfenstein: Enemy Territory" ]; then
@@ -125,11 +125,14 @@ fi
 if [ "${gamename}" == "TeamSpeak 3" ]; then
 	update_ts3.sh
 elif [ "${gamename}" == "Minecraft" ]; then
-	update_minecraft.sh
 	install_minecraft_eula.sh
+	update_minecraft.sh
 elif [ "${gamename}" == "Mumble" ]; then
 	update_mumble.sh
 elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then
+	if [ "${gamename}" == "Unreal Tournament" ]; then
+		install_unreal_tournament_eula.sh
+	fi
 	fn_install_server_files
 fi
 

+ 33 - 0
lgsm/functions/install_unreal_tournament_eula.sh

@@ -0,0 +1,33 @@
+#!/bin/bash
+# LGSM install_unreal_tournament_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://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula/"
+
+echo "eula=false" > "${filesdir}/eula.txt"
+
+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" "${filesdir}/eula.txt"