command_install.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # LinuxGSM command_install.sh function
  3. # Author: Daniel Gibbs
  4. # Contributor: UltimateByte
  5. # Website: https://linuxgsm.com
  6. # Description: Overall function for the installer.
  7. local commandname="INSTALL"
  8. local commandaction="Install"
  9. local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. check.sh
  11. if [ "$(whoami)" = "root" ]; then
  12. check_deps.sh
  13. else
  14. install_header.sh
  15. install_server_dir.sh
  16. install_logs.sh
  17. check_deps.sh
  18. installflag=1
  19. # Download and install
  20. if [ "${shortname}" == "ut2k4" ]; then
  21. install_server_files.sh
  22. install_ut2k4_key.sh
  23. elif [ -z "${appid}" ]; then
  24. installer=1
  25. install_server_files.sh
  26. elif [ -n "${appid}" ]; then
  27. install_steamcmd.sh
  28. install_server_files.sh
  29. fi
  30. # Configuration
  31. install_config.sh
  32. if [ "${shortname}" == "bb2" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "csgo" ]||[ "${shortname}" == "em" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "tf2" ]||[ "${shortname}" == "tu" ]; then
  33. install_gslt.sh
  34. elif [ "${shortname}" == "dst" ]; then
  35. install_dst_token.sh
  36. elif [ "${shortname}" == "squad" ]; then
  37. install_squad_license.sh
  38. elif [ "${shortname}" == "ts3" ]; then
  39. install_ts3db.sh
  40. elif [ "${shortname}" == "mta" ]; then
  41. command_install_resources_mta.sh
  42. fi
  43. fix.sh
  44. install_complete.sh
  45. core_exit.sh
  46. fi