mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-07-01 07:22:53 +00:00
Show public keys running configuration list command
This commit is contained in:
@ -8,4 +8,6 @@ fi
|
||||
echo "Configurations - sorted by creation date"
|
||||
echo
|
||||
echo "Server"
|
||||
cat "$DEVICE.conf" | grep -e "# Client" -e "# <-" | grep -a "#" | sed "s/# //" | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/"
|
||||
echo -n "PublicKey: "
|
||||
cat "$DEVICE.conf" | grep "PrivateKey =" | sed "s/PrivateKey = // " | wg pubkey
|
||||
cat "$DEVICE.conf" | grep -e "# Client" -e "PublicKey =" -e "# <-" | grep -a "" | sed "s/# //" | sed "s/ = /: / " | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/"
|
||||
|
Reference in New Issue
Block a user