install_ut2k4_key.sh 1013 B

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