install_minecraft_eula.sh 729 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # LinuxGSM install_minecraft_eula.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Gets user to accept the EULA.
  6. echo ""
  7. echo "Accept ${gamename} EULA"
  8. echo "================================="
  9. sleep 0.5
  10. echo "You are required to accept the EULA:"
  11. echo "https://account.mojang.com/documents/minecraft_eula"
  12. echo "eula=false" > "${serverfiles}/eula.txt"
  13. if [ -z "${autoinstall}" ]; then
  14. echo "By continuing you are indicating your agreement to the EULA."
  15. echo ""
  16. if ! fn_prompt_yn "Continue?" Y; then
  17. core_exit.sh
  18. fi
  19. else
  20. echo "By using auto-install you are indicating your agreement to the EULA."
  21. echo ""
  22. sleep 5
  23. fi
  24. sed -i "s/eula=false/eula=true/g" "${serverfiles}/eula.txt"