command_install.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. # LinuxGSM command_install.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Overall module for the installer.
  7. commandname="INSTALL"
  8. commandaction="Installing"
  9. moduleselfname="$(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. install_server_files.sh
  26. elif [ "${appid}" ]; then
  27. install_steamcmd.sh
  28. install_server_files.sh
  29. fi
  30. # Install gamedig
  31. check_gamedig.sh
  32. # Configuration.
  33. install_config.sh
  34. if [ -v gslt ]; then
  35. install_gslt.sh
  36. elif [ "${shortname}" == "dst" ]; then
  37. install_dst_token.sh
  38. elif [ "${shortname}" == "squad" ]; then
  39. install_squad_license.sh
  40. elif [ "${shortname}" == "ts3" ]; then
  41. install_ts3db.sh
  42. elif [ "${shortname}" == "mta" ]; then
  43. command_install_resources_mta.sh
  44. fn_firstcommand_reset
  45. fi
  46. fix.sh
  47. install_stats.sh
  48. install_complete.sh
  49. fi
  50. core_exit.sh