mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-24 13:47:40 +00:00
Add confirmation before removing WireGuard (#156)
This commit is contained in:
parent
e275546717
commit
a1b1ac2ece
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user