Naposledy aktivní 1 month ago

nuno revidoval tento gist 1 month ago. Přejít na revizi

1 file changed, 12 insertions

gistfile1.txt(vytvořil soubor)

@@ -0,0 +1,12 @@
1 + while IFS="|" read -r name ip rule subtype last_ts last_evt; do
2 + [[ -z "$name" ]] && continue
3 + local ip="${p_ips[$client_name]:-}"
4 + if [[ -z "$ip" ]]; then
5 + ip=$(grep "^Address" "$conf" | awk '{print $3}' | cut -d'/' -f1)
6 + fi
7 + p_ips["$name"]="$ip"
8 + p_rules["$name"]="${rule:-—}"
9 + p_subtypes["$name"]="$subtype"
10 + p_last_ts["$name"]="$last_ts"
11 + p_last_evt["$name"]="$last_evt"
12 + done < <(json::peer_data "$(ctx::clients)" "$(ctx::meta)" "$(ctx::events_log)")
Novější Starší