From 16fd83e1ec28dcfb8816c16b5cc4839b0538ff7e Mon Sep 17 00:00:00 2001 From: francoisPE <60675606+francoisPE@users.noreply.github.com> Date: Thu, 29 Sep 2022 14:22:25 +0200 Subject: [PATCH] Remove interface when uninstall Issue Proposal for small improvement #361 --- wireguard-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index 9126172..4f2677f 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -396,6 +396,9 @@ function uninstallWg() { # Reload sysctl sysctl --system + # delete interface + ip link delete dev ${SERVER_WG_NIC} + # Check if WireGuard is running systemctl is-active --quiet "wg-quick@${SERVER_WG_NIC}" WG_RUNNING=$?