wireguard-install icon indicating copy to clipboard operation
wireguard-install copied to clipboard

Debian 11 improvement

Open Reiner030 opened this issue 4 years ago • 1 comments

Hi, when checking scripts to have some automation usage for our Windows admins using also linux / pfSense I found your nice installation and configuration script.

While checking the script for functionality/security I found one improvement since Debian 11 is out. It would be nice if your script would setup buster backports only for buster but not for bullseye 😄: https://github.com/angristan/wireguard-install/blob/574cc06b31c73cb3b57ffb51b0b025052be69886/wireguard-install.sh#L129-L136

So it could be something like:

	elif [[ ${OS} == 'debian' ]]; then
	    if [[ ${VERSION_ID} -eq 10 ]]; 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
				apt-get update
			fi
			apt update
			apt-get install -y -t buster-backports wireguard
		fi
		apt-get install -y iptables resolvconf qrencode
```		

Reiner030 avatar Sep 30 '21 18:09 Reiner030

This issue is unrelevant.. this issue was resolved at #262, look closely at the if statement before the elif you have referenced:

https://github.com/angristan/wireguard-install/blob/469c2c58d63ac3140be44d9e9b6d35f074b97fcc/wireguard-install.sh#L130-L133

You can see that a check is being made, in case the debian version is > 10 (i.e. 11 and above).

gilboz avatar Jan 18 '22 19:01 gilboz