install_eula.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. if [ "${shortname}" == "ts3" ]; then
  8. eulaurl="https://www.teamspeak.com/en/privacy-and-terms"
  9. elif [ "${shortname}" == "mc" ]; then
  10. eulaurl="https://account.mojang.com/documents/minecraft_eula"
  11. elif [ "${shortname}" == "ut" ]; then
  12. eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula"
  13. fi
  14. echo -e ""
  15. echo -e "${lightyellow}Accept ${gamename} EULA${default}"
  16. echo -e "================================="
  17. fn_sleep_time
  18. echo -e "You are required to accept the EULA:"
  19. echo -e "${eulaurl}"
  20. echo -e ""
  21. if [ -z "${autoinstall}" ]; then
  22. echo -e "By continuing you are indicating your agreement to the EULA."
  23. echo -e ""
  24. if ! fn_prompt_yn "Continue?" Y; then
  25. exitcode=0
  26. core_exit.sh
  27. fi
  28. elif [ "${commandname}" == "START" ]; then
  29. fn_print_info "By continuing you are indicating your agreement to the EULA."
  30. echo -e ""
  31. sleep 5
  32. else
  33. echo -e "By using auto-install you are indicating your agreement to the EULA."
  34. echo -e ""
  35. sleep 5
  36. fi
  37. if [ "${shortname}" == "ts3" ]; then
  38. touch "${executabledir}/.ts3server_license_accepted"
  39. elif [ "${shortname}" == "mc" ]; then
  40. touch "${serverfiles}/eula.txt"
  41. echo -e "eula=true" > "${serverfiles}/eula.txt"
  42. elif [ "${shortname}" == "ut" ]; then
  43. :
  44. fi