command_install.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 modulename="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 [ "${appid}" ]; then
  27. install_steamcmd.sh
  28. install_server_files.sh
  29. fi
  30. # Configuration.
  31. install_config.sh
  32. if [ -v gslt ]; 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_stats.sh
  45. install_complete.sh
  46. fi
  47. core_exit.sh