From 54bbc165f8f18ee5ae79a860ecdb4b5cc8615474 Mon Sep 17 00:00:00 2001 From: Conrad Lane Date: Sun, 28 Apr 2024 22:01:30 +0700 Subject: [PATCH] Fix DNS resolving on Debian --- wireguard-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 2f95ecb..94543cc 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -171,9 +171,13 @@ function installWireGuard() { installQuestions # Install WireGuard tools and module - if [[ ${OS} == 'ubuntu' ]] || [[ ${OS} == 'debian' && ${VERSION_ID} -gt 10 ]]; then + if [[ ${OS} == 'ubuntu' ]]; then apt-get update apt-get install -y wireguard iptables resolvconf qrencode + elif [[ ${OS} == 'debian' && ${VERSION_ID} -gt 10 ]]; then + apt-get update + apt-get install -y wireguard iptables resolvconf qrencode + resolvconf -u elif [[ ${OS} == 'debian' ]]; then if ! grep -rqs "^deb .* buster-backports" /etc/apt/; then echo "deb http://deb.debian.org/debian buster-backports main" >/etc/apt/sources.list.d/backports.list