1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-10-31 18:52:31 +00:00

Add confirmation before removing WireGuard (#156)

This commit is contained in:
randomshell 2020-11-14 00:47:36 +00:00 committed by GitHub
parent e275546717
commit a1b1ac2ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,6 +344,9 @@ function revokeClient() {
}
function uninstallWg() {
echo ""
read -rp "Do you really want to remove WireGuard? [y/n]: " -e -i n REMOVE
if [[ $REMOVE == 'y' ]]; then
checkOS
systemctl stop "wg-quick@${SERVER_WG_NIC}"
@ -384,6 +387,10 @@ function uninstallWg() {
echo "WireGuard uninstalled successfully."
exit 0
fi
else
echo ""
echo "Removal aborted!"
fi
}
function manageMenu() {