command_install.sh 1.1 KB

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