1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-11-24 13:47:40 +00:00

Add hot reloading (#181)

This commit is contained in:
Filipe Melo 2021-04-27 17:44:29 -03:00 committed by GitHub
parent b7855925e6
commit 9bce7d6e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,7 @@ PublicKey = ${CLIENT_PUB_KEY}
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128" >>"/etc/wireguard/${SERVER_WG_NIC}.conf"
systemctl restart "wg-quick@${SERVER_WG_NIC}"
wg syncconf "${SERVER_WG_NIC}" <(wg-quick strip "${SERVER_WG_NIC}")
echo -e "\nHere is your client config file as a QR Code:"
@ -347,7 +347,7 @@ function revokeClient() {
rm -f "${HOME}/${SERVER_WG_NIC}-client-${CLIENT_NAME}.conf"
# restart wireguard to apply changes
systemctl restart "wg-quick@${SERVER_WG_NIC}"
wg syncconf "${SERVER_WG_NIC}" <(wg-quick strip "${SERVER_WG_NIC}")
}
function uninstallWg() {