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. info_config.sh
  17. info_parms.sh
  18. if [ "${engine}" == "idtech3_ql" ]; then
  19. local engine="quakelive"
  20. elif [ "${gamename}" == "Killing Floor 2" ]; then
  21. local engine="unreal4"
  22. fi
  23. query_gamedig.sh
  24. echo "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${port}\"|jq"
  25. echo""
  26. echo "${gamedigraw}" | jq
  27. echo""
  28. echo "================================="
  29. echo "gsquery Raw Output"
  30. echo "================================="
  31. echo""
  32. echo "./query_gsquery.py -a \"${ip}\" -p \"${port}\" -e \"${engine}\""
  33. if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
  34. fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
  35. fi
  36. "${functionsdir}"/query_gsquery.py -a "${ip}" -p "${port}" -e "${engine}"