1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

chore: add logging

This commit is contained in:
aclist 2023-12-03 17:41:34 +09:00
parent 25eee69e82
commit a83933ee8f

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=4.1.0.rc-3 version=4.1.0.rc-4
aid=221100 aid=221100
game="dayz" game="dayz"
@ -750,6 +750,8 @@ parse_ips(){
local lan_ip=$(<<< $ip awk -F: '{print $1}') local lan_ip=$(<<< $ip awk -F: '{print $1}')
local lan_qport=$(<<< $ip awk -F: '{print $2}') local lan_qport=$(<<< $ip awk -F: '{print $2}')
res=$(a2s $lan_ip $lan_qport info) res=$(a2s $lan_ip $lan_qport info)
logger INFO "Local LAN response follows"
logger INFO "$res"
if [[ ! $? -eq 0 ]] || [[ $(<<< $res jq '.response|length') -eq 0 ]]; then if [[ ! $? -eq 0 ]] || [[ $(<<< $res jq '.response|length') -eq 0 ]]; then
warn "Failed to retrieve server metadata. Check IP:PORT combination and try again." warn "Failed to retrieve server metadata. Check IP:PORT combination and try again."
return 1 return 1