install_ut2k4_key.sh 977 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # LinuxGSM install_ut2k4_key.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Activates ut2k4 server with given key.
  7. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  8. echo -e ""
  9. echo -e "${bold}${lightyellow}Enter ${gamename} CD Key${default}"
  10. fn_messages_separator
  11. echo -e "To get your server listed on the Master Server list"
  12. echo -e "you must get a free CD key. Get a key here:"
  13. echo -e "${italic}https://www.epicgames.com/unrealtournament/forums/cdkey.php?2004"
  14. echo -e ""
  15. if [ -z "${autoinstall}" ]; then
  16. echo -e "Once you have the key enter it below"
  17. echo -n "KEY: "
  18. read -r CODE
  19. printf '"CDKey"="%s"\n' "${CODE}" > "${systemdir}/cdkey"
  20. if [ -f "${systemdir}/cdkey" ]; then
  21. fn_script_log_info "UT2K4 Server CD Key created"
  22. fi
  23. else
  24. echo -e "You can add your key using the following command"
  25. echo -e "./${selfname} server-cd-key"
  26. fi
  27. echo -e ""
  28. core_exit.sh