install_eula.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. # LinuxGSM install_eula.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Gets user to accept the EULA.
  6. if [ "${shortname}" == "ts3" ]; then
  7. eulaurl="https://www.teamspeak.com/en/privacy-and-terms"
  8. elif [ "${shortname}" == "mc" ]; then
  9. eulaurl="https://account.mojang.com/documents/minecraft_eula"
  10. elif [ "${shortname}" == "ut" ]; then
  11. eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula"
  12. fi
  13. echo -e ""
  14. echo -e "${lightyellow}Accept ${gamename} EULA${default}"
  15. echo -e "================================="
  16. fn_sleep_time
  17. echo -e "You are required to accept the EULA:"
  18. echo -e "${eulaurl}"
  19. echo -e ""
  20. if [ -z "${autoinstall}" ]; then
  21. echo -e "By continuing you are indicating your agreement to the EULA."
  22. echo -e ""
  23. if ! fn_prompt_yn "Continue?" Y; then
  24. core_exit.sh
  25. fi
  26. elif [ "${function_selfname}" == "command_start.sh" ]; then
  27. fn_print_info "By continuing you are indicating your agreement to the EULA."
  28. echo -e ""
  29. sleep 5
  30. else
  31. echo -e "By using auto-install you are indicating your agreement to the EULA."
  32. echo -e ""
  33. sleep 5
  34. fi
  35. if [ "${shortname}" == "ts3" ]; then
  36. touch "${executabledir}/.ts3server_license_accepted"
  37. elif [ "${shortname}" == "mc" ]; then
  38. touch "${serverfiles}/eula.txt"
  39. echo -e "eula=true" > "${serverfiles}/eula.txt"
  40. elif [ "${shortname}" == "ut" ]; then
  41. :
  42. fi