1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-11-22 04:35:09 +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() { function uninstallWg() {
echo ""
read -rp "Do you really want to remove WireGuard? [y/n]: " -e -i n REMOVE
if [[ $REMOVE == 'y' ]]; then
checkOS checkOS
systemctl stop "wg-quick@${SERVER_WG_NIC}" systemctl stop "wg-quick@${SERVER_WG_NIC}"
@ -384,6 +387,10 @@ function uninstallWg() {
echo "WireGuard uninstalled successfully." echo "WireGuard uninstalled successfully."
exit 0 exit 0
fi fi
else
echo ""
echo "Removal aborted!"
fi
} }
function manageMenu() { function manageMenu() {