diff --git a/installers/common.sh b/installers/common.sh index 26f3e92f..fe36303a 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -350,18 +350,10 @@ function _prompt_install_wireguard() { # Install Wireguard from the Debian unstable distro function _install_wireguard() { _install_log "Configure WireGuard support" - if [ "$OS" == "Raspbian" ]; then - echo "Installing raspberrypi-kernel-headers" - sudo apt-get install $apt_option raspberrypi-kernel-headers || _install_status 1 "Unable to install raspberrypi-kernel-headers" + 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" fi - echo "Installing WireGuard from Debian unstable distro" - echo "Adding Debian distro" - echo "deb http://deb.debian.org/debian/ unstable main" | sudo tee --append /etc/apt/sources.list.d/unstable.list || _install_status 1 "Unable to append to sources.list" - sudo apt-get install dirmngr || _install_status 1 "Unable to install dirmngr" - echo "Adding Debian distro keys" - sudo wget -q -O - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr).asc | sudo apt-key add - || _install_status 1 "Unable to add keys" - printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable || _install_status 1 "Unable to append to preferences.d" - echo "Installing WireGuard" + echo "Installing wireguard from apt" sudo apt-get update && sudo apt-get install $apt_option wireguard || _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"