angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
7.51k stars 1.26k forks source link

Remove default value "n" when uninstalling #369

Closed Hasan-aga closed 1 year ago

Hasan-aga commented 1 year ago

When we run this script on a machine that already has Wireguard the script detects the presence of Wireguard and gives us this prompt:

Welcome to WireGuard-install!
The git repository is available at: https://github.com/angristan/wireguard-install

It looks like WireGuard is already installed.

What do you want to do?
   1) Add a new user
   2) Revoke existing user
   3) Uninstall WireGuard
   4) Exit

My complaint is that when I choose option no. 3, I get this prompt:

Select an option [1-4]: 3

Do you really want to remove WireGuard? [y/n]: n

Which already has "n" written on it as a default value, which is fine if it would be overwritten by whatever value I type ("y" for example) instead if I type "y" I end up with "ny" and the process defaults to terminate without uninstall.

This could be a feature to make sure a user really wants to uninstall but I've never seen anything like it with other shell apps, plus it is annoying.

angristan commented 1 year ago

Agreed, I merged your PR. Thanks!