install_eula.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. sleep 5
  32. else
  33. echo -e "By using auto-install you are indicating your agreement to the EULA."
  34. sleep 5
  35. fi
  36. if [ "${shortname}" == "ts3" ]; then
  37. touch "${executabledir}/.ts3server_license_accepted"
  38. elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then
  39. touch "${serverfiles}/eula.txt"
  40. echo -e "eula=true" > "${serverfiles}/eula.txt"
  41. elif [ "${shortname}" == "ut" ]; then
  42. :
  43. fi