mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-04-19 13:26:50 +00:00
Check if client config exists
This commit is contained in:
parent
9afa126178
commit
214f830065
@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f "$DEVICE-client_$1.conf" ]; then
|
||||
echo "No client $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONFIG=$(cat "$DEVICE.conf" | sed "/^\# Client $1/{N;N;N;N;d}")
|
||||
|
||||
echo "$CONFIG" > "$DEVICE.conf"
|
||||
|
@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f "$DEVICE-client_$1.conf" ]; then
|
||||
echo "No client $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat "$DEVICE-client_$1.conf"
|
||||
|
||||
echo
|
||||
|
Loading…
x
Reference in New Issue
Block a user