install_ut2k4_key.sh 991 B

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