install_gslt.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # LGSM install_gslt.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Configures GSLT.
  6. local commandname="INSTALL"
  7. local commandaction="Install"
  8. local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
  9. echo ""
  10. echo "Game Server Login Token"
  11. echo "================================="
  12. sleep 1
  13. if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
  14. echo "GSLT is required to run a public ${gamename} server"
  15. fn_script_log_info "GSLT is required to run a public ${gamename} server"
  16. else
  17. echo "GSLT is an optional feature for ${gamename} server"
  18. fn_script_log_info "GSLT is an optional feature for ${gamename} server"
  19. fi
  20. echo "Get more info and a token here:"
  21. echo "https://gameservermanagers.com/gslt"
  22. fn_script_log_info "Get more info and a token here:"
  23. fn_script_log_info "https://gameservermanagers.com/gslt"
  24. echo ""
  25. if [ -z "${autoinstall}" ]; then
  26. echo "Enter token below (Can be blank)."
  27. echo -n "GSLT TOKEN: "
  28. read token
  29. sed -i -e "s/gslt=\"\"/gslt=\"${token}\"/g" "${rootdir}/${selfname}"
  30. fi
  31. sleep 1
  32. echo "The GSLT can be changed by editing ${selfname}."
  33. fn_script_log_info "The GSLT can be changed by editing ${selfname}."
  34. echo ""