install_ut2k4_key.sh 943 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # LGSM install_ut2k4_key.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Activates ut2k4 server with given key.
  6. local commandname="INSTALL"
  7. local commandaction="Install"
  8. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  9. echo ""
  10. echo "Enter ${gamename} CD Key"
  11. echo "================================="
  12. sleep 1
  13. echo "To get your server listed on the Master Server list"
  14. echo "you must get a free CD key. Get a key here:"
  15. echo "https://forums.unrealtournament.com/utserver/cdkey.php?2004"
  16. echo ""
  17. if [ -z "${autoinstall}" ]; then
  18. echo "Once you have the key enter it below"
  19. echo -n "KEY: "
  20. read CODE
  21. echo ""\""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 "You can add your key using the following command"
  27. echo "./${selfname} server-cd-key"
  28. fi
  29. echo ""