command_dev_query_raw.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. # command_dev_query_raw.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://gameservermanagers.com
  5. # Description: Raw gamedig output of the server.
  6. echo "================================="
  7. echo "Gamedig Raw Output"
  8. echo "================================="
  9. echo""
  10. if [ ! "$(command -v gamedig 2>/dev/null)" ]; then
  11. fn_print_failure_nl "gamedig not installed"
  12. fi
  13. if [ ! "$(command -v jq 2>/dev/null)" ]; then
  14. fn_print_failure_nl "jq not installed"
  15. fi
  16. check.sh
  17. info_config.sh
  18. info_parms.sh
  19. if [ "${engine}" == "idtech3_ql" ]; then
  20. local engine="quakelive"
  21. elif [ "${gamename}" == "Killing Floor 2" ]; then
  22. local engine="unreal4"
  23. fi
  24. query_gamedig.sh
  25. echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${port}\"|jq"
  26. echo""
  27. echo "${gamedigraw}" | jq
  28. echo""
  29. echo "================================="
  30. echo "gsquery Raw Output"
  31. echo "================================="
  32. echo""
  33. echo "./query_gsquery.py -a \"${ip}\" -p \"${port}\" -e \"${engine}\""
  34. if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
  35. fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
  36. fi
  37. "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${port}" -e "${engine}"