command_install.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. fn_commandname(){
  8. commandname="INSTALL"
  9. commandaction="Installing"
  10. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  11. }
  12. fn_commandname
  13. check.sh
  14. if [ "$(whoami)" = "root" ]; then
  15. check_deps.sh
  16. else
  17. install_header.sh
  18. install_server_dir.sh
  19. install_logs.sh
  20. check_deps.sh
  21. installflag=1
  22. # Download and install.
  23. if [ "${shortname}" == "ut2k4" ]; then
  24. install_server_files.sh
  25. install_ut2k4_key.sh
  26. elif [ -z "${appid}" ]; then
  27. installer=1
  28. install_server_files.sh
  29. elif [ "${appid}" ]; then
  30. install_steamcmd.sh
  31. install_server_files.sh
  32. fi
  33. # Configuration.
  34. install_config.sh
  35. if [ -v gslt ]; then
  36. install_gslt.sh
  37. elif [ "${shortname}" == "dst" ]; then
  38. install_dst_token.sh
  39. elif [ "${shortname}" == "squad" ]; then
  40. install_squad_license.sh
  41. elif [ "${shortname}" == "ts3" ]; then
  42. install_ts3db.sh
  43. elif [ "${shortname}" == "mta" ]; then
  44. command_install_resources_mta.sh
  45. fn_commandname
  46. fi
  47. fix.sh
  48. install_stats.sh
  49. install_complete.sh
  50. fi
  51. core_exit.sh