install_eula.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # LinuxGSM install_eula.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Gets user to accept the EULA.
  7. moduleselfname="$(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 "${bold}${lightyellow}Accept ${gamename} EULA${default}"
  17. fn_messages_separator
  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. fn_sleep_time_5
  31. else
  32. echo -e "By using auto-install you are indicating your agreement to the EULA."
  33. fn_sleep_time_5
  34. fi
  35. if [ "${shortname}" == "ts3" ]; then
  36. touch "${executabledir}/.ts3server_license_accepted"
  37. elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then
  38. touch "${serverfiles}/eula.txt"
  39. echo -e "eula=true" > "${serverfiles}/eula.txt"
  40. elif [ "${shortname}" == "ut" ]; then
  41. :
  42. fi