install_eula.sh 1.5 KB

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