mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-04-19 13:26:50 +00:00
Add command to list server and all clients by creation date
This commit is contained in:
parent
22dc642ffe
commit
cac4c23574
@ -36,6 +36,11 @@ case "$1" in
|
|||||||
/scripts/show-client.sh $2
|
/scripts/show-client.sh $2
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
'ls-configs')
|
||||||
|
cd /etc/wireguard
|
||||||
|
/scripts/ls-configs.sh
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Starting wg-quick on $DEVICE"
|
echo "Starting wg-quick on $DEVICE"
|
||||||
touch "${WG_LOG_FILE}"
|
touch "${WG_LOG_FILE}"
|
||||||
|
6
scripts/ls-configs.sh
Executable file
6
scripts/ls-configs.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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/"
|
Loading…
x
Reference in New Issue
Block a user