mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-07-02 23:32:54 +00:00
Add script to remove client
This commit is contained in:
10
scripts/rm-client.sh
Executable file
10
scripts/rm-client.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONFIG=$(cat "$DEVICE.conf" | sed "/^\# Client $1/{N;N;N;N;d}")
|
||||
|
||||
echo "$CONFIG" > "$DEVICE.conf"
|
||||
|
||||
rm "$DEVICE-client_$1.conf" 2>/dev/null
|
||||
rm "$DEVICE-client_$1.png" 2>/dev/null
|
||||
|
||||
echo "Client # $1 removed"
|
Reference in New Issue
Block a user