mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-23 07:40:11 +00:00
Implemented feature request from issue #942 (WireGuard)
This commit is contained in:
parent
bf0015c303
commit
3f616d9254
4 changed files with 28 additions and 5 deletions
|
@ -101,9 +101,19 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
((DELETED_COUNT++))
|
||||
echo "::: Successfully deleted ${CLIENT_NAME}"
|
||||
|
||||
((DELETED_COUNT++))
|
||||
# If using Pi-hole, remove the client from the hosts file
|
||||
if [ -f /etc/pivpn/hosts.wireguard ]; then
|
||||
sed "\#10.6.0.${COUNT} ${CLIENT_NAME}.pivpn#d" -i /etc/pivpn/hosts.wireguard
|
||||
if killall -SIGHUP pihole-FTL; then
|
||||
echo "::: Updated hosts file for Pi-hole"
|
||||
else
|
||||
echo "::: Failed to reload pihole-FTL configuration"
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue