Fix DNS resolving on Debian

This commit is contained in:
Conrad Lane 2024-04-28 22:01:30 +07:00
parent 39caf2fcf6
commit 54bbc165f8
No known key found for this signature in database
GPG Key ID: 905B7851164FD587

View File

@ -171,9 +171,13 @@ function installWireGuard() {
installQuestions installQuestions
# Install WireGuard tools and module # Install WireGuard tools and module
if [[ ${OS} == 'ubuntu' ]] || [[ ${OS} == 'debian' && ${VERSION_ID} -gt 10 ]]; then if [[ ${OS} == 'ubuntu' ]]; then
apt-get update apt-get update
apt-get install -y wireguard iptables resolvconf qrencode 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 elif [[ ${OS} == 'debian' ]]; then
if ! grep -rqs "^deb .* buster-backports" /etc/apt/; 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 echo "deb http://deb.debian.org/debian buster-backports main" >/etc/apt/sources.list.d/backports.list