mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-10-31 18:52:31 +00:00
Fix for debian 10+
This commit is contained in:
parent
21b5e56eea
commit
987820dd93
@ -32,8 +32,8 @@ function checkOS() {
|
|||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
OS="${ID}" # debian or ubuntu
|
OS="${ID}" # debian or ubuntu
|
||||||
if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then
|
if [[ ${ID} == "debian" || ${ID} == "raspbian" ]]; then
|
||||||
if [[ ${VERSION_ID} -ne 10 ]]; then
|
if [[ ${PRETTY_NAME} != "Debian GNU/Linux 10 (buster)" && ${PRETTY_NAME} != "Debian GNU/Linux bullseye/sid" ]]; then
|
||||||
echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10 Buster"
|
echo "Your version of Debian (${VERSION_ID}) is not supported. Please use Debian 10+"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -123,13 +123,17 @@ function installWireGuard() {
|
|||||||
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' ]]; then
|
elif [[ ${OS} == 'debian' ]]; then
|
||||||
if ! grep -rqs "^deb .* buster-backports" /etc/apt/; then
|
if [[ ${PRETTY_NAME} == "Debian GNU/Linux 10 (buster)" ]]; 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
|
||||||
apt-get update
|
apt update
|
||||||
fi
|
fi
|
||||||
apt update
|
apt update
|
||||||
apt-get install -y iptables resolvconf qrencode
|
apt install -y -t buster-backports wireguard
|
||||||
apt-get install -y -t buster-backports wireguard
|
else
|
||||||
|
apt install -y wireguard
|
||||||
|
fi
|
||||||
|
apt install -y iptables resolvconf qrencode
|
||||||
elif [[ ${OS} == 'fedora' ]]; then
|
elif [[ ${OS} == 'fedora' ]]; then
|
||||||
if [[ ${VERSION_ID} -lt 32 ]]; then
|
if [[ ${VERSION_ID} -lt 32 ]]; then
|
||||||
dnf install -y dnf-plugins-core
|
dnf install -y dnf-plugins-core
|
||||||
|
Loading…
Reference in New Issue
Block a user