mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
chore: fix git stash issue
This commit is contained in:
parent
4b56760a80
commit
ec5debb582
1 changed files with 0 additions and 15 deletions
|
@ -99,20 +99,6 @@ function wg_peers {
|
|||
local -n _wg_peers=$1
|
||||
local iface=$2
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
# From wg 8 manpage:
|
||||
# If dump is specified, then several lines are printed; the first contains
|
||||
# in order separated by tab: private-key, public-key, listen-port, fwmark.
|
||||
# Subsequent lines are printed for each peer and contain in order separated
|
||||
# by tab: public-key, preshared-key, endpoint, allowed-ips, latest-handshake,
|
||||
# transfer-rx, transfer-tx, persistent-keepalive
|
||||
for line in $(wg show "$iface" dump | grep -v none | tr '\t' ';'); do
|
||||
column_count=$(awk -F';' '{print NF}' <<< "$line")
|
||||
if [ "$column_count" -ne 8 ]; then
|
||||
# First line of dump contains interface info, ignore this line
|
||||
continue
|
||||
fi
|
||||
=======
|
||||
if [ -z "${_CACHE_PEERS[$iface]}" ]; then
|
||||
# From wg 8 manpage:
|
||||
# If dump is specified, then several lines are printed; the first contains
|
||||
|
@ -123,7 +109,6 @@ function wg_peers {
|
|||
# Pipe to tail to skip first line
|
||||
_CACHE_PEERS["$iface"]="$(wg show "$iface" dump | tail -n +2)"
|
||||
fi
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
readarray -t peers <<< "${_CACHE_PEERS[$iface]}"
|
||||
_wg_peers=("${peers[@]}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue