command_update.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # LinuxGSM command_update.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Handles updating of servers.
  7. commandname="UPDATE"
  8. commandaction="Updating"
  9. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. fn_firstcommand_set
  11. fn_print_dots ""
  12. check.sh
  13. core_logs.sh
  14. check_last_update.sh
  15. if [ "${shortname}" == "ts3" ]; then
  16. update_ts3.sh
  17. elif [ "${shortname}" == "mc" ]; then
  18. update_mc.sh
  19. elif [ "${shortname}" == "mcb" ]; then
  20. update_mcb.sh
  21. elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then
  22. update_pmc.sh
  23. elif [ "${shortname}" == "fctr" ]; then
  24. update_fctr.sh
  25. elif [ "${shortname}" == "hyt" ]; then
  26. update_hyt.sh
  27. elif [ "${shortname}" == "mta" ]; then
  28. update_mta.sh
  29. elif [ "${shortname}" == "jk2" ]; then
  30. update_jk2.sh
  31. elif [ "${shortname}" == "vints" ]; then
  32. update_vints.sh
  33. elif [ "${shortname}" == "bb" ]; then
  34. update_bb.sh
  35. elif [ "${shortname}" == "ut99" ]; then
  36. update_ut99.sh
  37. elif [ "${shortname}" == "xnt" ]; then
  38. update_xnt.sh
  39. elif [ "${shortname}" == "etl" ]; then
  40. update_etl.sh
  41. else
  42. update_steamcmd.sh
  43. fi
  44. if { [ "${shortname}" == "arma3" ] || [ "${shortname}" == "dayz" ] || [ "${shortname}" == "sb" ] || [ "${shortname}" == "squad" ]; } && { [ -n "${workshopmods}" ] || [ -f "${datadir}/${selfname}-workshop.txt" ]; }; then
  45. workshop_core.sh
  46. fn_workshop_update
  47. fi
  48. # remove update lockfile.
  49. rm -f "${lockdir:?}/update.lock"
  50. core_exit.sh