Skip to content

Commit

Permalink
plugin: wireguard
Browse files Browse the repository at this point in the history
changed test to pluginctl
  • Loading branch information
crpb authored and zerwes committed Aug 26, 2024
1 parent 3bbf534 commit b5d41f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions files/wireguard
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

wg=$(which wg)

if ! [ "$(pluginctl -S wireguard)" = "[]" ]; then
echo '<<<wireguard:sep(9)>>>'
for iface in $($wg show interfaces); do
echo "[[$iface]]"
$wg show $iface dump | tail -n +2 | cut -f1,3- -d' '
done

fi

0 comments on commit b5d41f5

Please sign in to comment.