From 2a065111b1ecbe95cb6d2e16edbe1c48a1be1fa8 Mon Sep 17 00:00:00 2001 From: Nyr Date: Mon, 16 Aug 2021 20:22:06 +0200 Subject: [PATCH] Check for wget or curl Fix #37 --- wireguard-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index 6f05441..5b779b7 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -176,6 +176,13 @@ EOF } if [[ ! -e /etc/wireguard/wg0.conf ]]; then + # Detect some Debian minimal setups where neither wget nor curl are installed + if ! hash wget 2>/dev/null && ! hash curl 2>/dev/null; then + echo "Wget is required to use this installer." + read -n1 -r -p "Press any key to install Wget and continue..." + apt-get update + apt-get install -y wget + fi clear echo 'Welcome to this WireGuard road warrior installer!' # If system has a single IPv4, it is selected automatically. Else, ask the user