Add script to remove client

This commit is contained in:
2022-11-29 07:24:44 +01:00
parent fbbb26f4cb
commit 074ecc8857
3 changed files with 44 additions and 13 deletions

10
scripts/rm-client.sh Executable file
View 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"