aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Melo <52608336+fmelosilva@users.noreply.github.com>2021-04-27 17:44:29 -0300
committerGitHub <noreply@github.com>2021-04-27 22:44:29 +0200
commit9bce7d6e827ed9fc8c5e02a5e03fcd916f6fd37d (patch)
treee53c202fcb143b9307dd6115d06fca6164c612fe
parentb7855925e65a2874dd5c20fb36b7d542bb0b546f (diff)
Add hot reloading (#181)
-rw-r--r--wireguard-install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index 32c3451..c8948b4 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -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() {