Update wireguard-install.sh

Add checking for curl and wget, if they aren't present in the system, return an error
This commit is contained in:
nibbl3 2021-02-21 22:56:17 +02:00 committed by GitHub
parent 70e28bcc1a
commit 2e31d056e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,12 @@ TUN needs to be enabled before running this installer."
fi
fi
# Check wget/curl existence in the system
if ! [[ -f $(which curl) || -f $(which wget) ]]; then
echo 'wget/curl is not installed. Install them to continue the installation or check your $PATH envirovment variable.'
exit 1
fi
new_client_dns () {
echo "Select a DNS server for the client:"
echo " 1) Current system resolvers"