install_minecraft_eula.sh 796 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # LGSM install_minecraft_eula.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Gets user to accept the EULA.
  6. echo ""
  7. echo "Accept ${gamename} EULA"
  8. echo "================================="
  9. sleep 1
  10. echo "You are required to accept the EULA:"
  11. echo "https://account.mojang.com/documents/minecraft_eula"
  12. if [ -z "${autoinstall}" ]; then
  13. echo "By continuing you are indicating your agreement to the EULA."
  14. echo ""
  15. while true; do
  16. read -e -i "y" -p "Continue [Y/n]" yn
  17. case $yn in
  18. [Yy]* ) break;;
  19. [Nn]* ) core_exit.sh;;
  20. * ) echo "Please answer yes or no.";;
  21. esac
  22. done
  23. else
  24. echo "By using auto-install you are indicating your agreement to the EULA."
  25. echo ""
  26. sleep 5
  27. fi
  28. sed -i "s/\"eula=false\"/\"eula=true\"/g" serverfiles/eula.txt