command_update.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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}" == "mta" ]; then
  26. update_mta.sh
  27. elif [ "${shortname}" == "jk2" ]; then
  28. update_jk2.sh
  29. elif [ "${shortname}" == "vints" ]; then
  30. update_vints.sh
  31. elif [ "${shortname}" == "ut99" ]; then
  32. update_ut99.sh
  33. elif [ "${shortname}" == "xnt" ]; then
  34. update_xnt.sh
  35. else
  36. update_steamcmd.sh
  37. fi
  38. # remove update lockfile.
  39. rm -f "${lockdir:?}/update.lock"
  40. core_exit.sh