Remove interface when uninstall

Issue Proposal for small improvement #361
This commit is contained in:
francoisPE 2022-09-29 14:22:25 +02:00 committed by GitHub
parent 29d43c61f2
commit 16fd83e1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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=$?