From 54ec50c27f8fb8191f05d4d495568c620c8fa1a1 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 28 Nov 2023 17:08:35 +0000 Subject: [PATCH 1/2] Add resolvconf to wireguard install --- installers/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index e7a54659..0694170a 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -509,7 +509,7 @@ function _install_wireguard() { echo 'deb http://ftp.debian.org/debian buster-backports main' | sudo tee /etc/apt/sources.list.d/buster-backports.list || _install_status 1 "Unable to add Debian backports repo" fi echo "Installing wireguard from apt" - sudo apt-get install -y wireguard || _install_status 1 "Unable to install wireguard" + sudo apt-get install -y wireguard resolvconf || _install_status 1 "Unable to install wireguard" echo "Enabling wg-quick@wg0" sudo systemctl enable wg-quick@wg0 || _install_status 1 "Failed to enable wg-quick service" echo "Enabling WireGuard management option" From 93f6069dc38bfbf45bde16c209a33f6016b57253 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 1 Dec 2023 13:57:15 +0000 Subject: [PATCH 2/2] Add resolvconf dependency to wg install for Debian 12/Ubuntu 22.04 --- installers/common.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index 0694170a..ab2dad11 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -93,6 +93,7 @@ function _config_installation() { echo "Detected OS: ${DESC} ${LONG_BIT}-bit" echo "Using GitHub repository: ${repo} ${branch} branch" echo "Configuration directory: ${raspap_dir}" + if [ -n "$path" ]; then echo "Setting install path to ${path}" webroot_dir=$path @@ -505,11 +506,12 @@ function _prompt_install_wireguard() { # Install Wireguard from the Debian unstable distro function _install_wireguard() { _install_log "Configure WireGuard support" - if [ "$OS" == "Debian" ]; then - echo 'deb http://ftp.debian.org/debian buster-backports main' | sudo tee /etc/apt/sources.list.d/buster-backports.list || _install_status 1 "Unable to add Debian backports repo" + if { [ "$OS" == "Debian" ] && [ "$RELEASE" == 12 ]; } || + { [ "$OS" == "Ubuntu" ] && [ "$RELEASE" == "22.04" ]; }; then + wg_dep="resolvconf" fi echo "Installing wireguard from apt" - sudo apt-get install -y wireguard resolvconf || _install_status 1 "Unable to install wireguard" + sudo apt-get install -y wireguard $wg_dep || _install_status 1 "Unable to install wireguard" echo "Enabling wg-quick@wg0" sudo systemctl enable wg-quick@wg0 || _install_status 1 "Failed to enable wg-quick service" echo "Enabling WireGuard management option"