From 721d16e97965c51a0b131b80ca2c40c5a8f40fad Mon Sep 17 00:00:00 2001 From: Shyam Jos Date: Sat, 19 Oct 2019 23:12:01 +0530 Subject: [PATCH] added missing package - resolvconf without resolvconf package, systemd unit file will fail in Debian 10 and ubuntu 18.04 or higher versions see error below ``` Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] ip link add wg0 type wireguard Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] wg setconf wg0 /dev/fd/63 Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] ip -4 address add 10.9.0.3/24 dev wg0 Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] ip link set mtu 1420 up dev wg0 Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] resolvconf -a wg0 -m 0 -x Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: /usr/bin/wg-quick: line 31: resolvconf: command not found Oct 17 12:11:39 Asus-VivoBook wg-quick[25620]: [#] ip link delete dev wg0 Oct 17 12:11:39 Asus-VivoBook systemd[1]: wg-quick@wg0.service: Main process exited ``` more info here : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930735 --- wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index e6f1287..0dcbc40 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -85,13 +85,13 @@ if [[ "$OS" = 'ubuntu' ]]; then add-apt-repository ppa:wireguard/wireguard apt-get update apt-get install "linux-headers-$(uname -r)" - apt-get install wireguard iptables + apt-get install wireguard iptables resolvconf elif [[ "$OS" = 'debian' ]]; then echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable apt update apt-get install "linux-headers-$(uname -r)" - apt install wireguard iptables + apt install wireguard iptables resolvconf elif [[ "$OS" = 'fedora' ]]; then dnf copr enable jdoss/wireguard dnf install wireguard-dkms wireguard-tools iptables