1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-06-05 21:10:48 +00:00

Fix files removal on revokeClient()

This commit is contained in:
randomshell 2020-09-03 04:12:05 +00:00
parent 829962d3f8
commit b006f6bece

View File

@ -330,7 +330,8 @@ function revokeClient() {
sed -i "/^### Client ${CLIENT_NAME}\$/,/^$/d" "/etc/wireguard/${SERVER_WG_NIC}.conf"
# remove generated client file
rm -f "${HOME}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
find /home/ -maxdepth 2 -name "${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf" -delete
rm -f "/root/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
# restart wireguard to apply changes
systemctl restart "wg-quick@${SERVER_WG_NIC}"