4
0

command_install.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. # LinuxGSM command_install.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: http://linuxgsm.com/contrib
  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" ] && [ ! -f /.dockerenv ]; 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. 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. fn_firstcommand_reset
  43. fi
  44. fix.sh
  45. install_stats.sh
  46. install_complete.sh
  47. fi
  48. core_exit.sh