check_version.sh 694 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # LinuxGSM command_version.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Will run update-lgsm if gameserver.sh and modules version does not match
  6. # this will allow gameserver.sh to update - useful for multi instance servers.
  7. if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modulesversion}" ]; then
  8. exitbypass=1
  9. echo -e ""
  10. fn_print_error_nl "LinuxGSM version mismatch"
  11. echo -e ""
  12. echo -e "* ${selfname}: ${version}"
  13. echo -e "* modules: ${modulesversion}"
  14. echo -e ""
  15. fn_sleep_time
  16. fn_script_log_error "LinuxGSM Version mismatch: ${selfname}: ${version}: modules: ${modulesversion}"
  17. command_update_linuxgsm.sh
  18. fi