1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-05-31 18:50:47 +00:00

Update wireguard-install.sh

This commit is contained in:
liberodark 2019-12-20 10:59:30 +01:00 committed by GitHub
parent 2aae41d0c1
commit 26859aaa85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,8 @@ echo "Remove WireGuard Server ($distribution)"
apt-get install -y wireguard iptables --force-yes > /dev/null 2>&1
rm -rf /etc/wireguard
rm -f /etc/sysctl.d/wg.conf
rm -f /etc/apt/sources.list.d/unstable.list
rm -f /etc/apt/preferences.d/limit-unstable
sysctl --system
elif [ "$distribution" = "Manjaro" ] || [ "$distribution" = "Arch\ Linux" ]; then
@ -170,7 +172,8 @@ echo "Install WireGuard Server ($distribution)"
apt-get install -y wireguard iptables resolvconf --force-yes > /dev/null 2>&1
elif [ "$distribution" = "Debian" ] || [ "$distribution" = "Raspbian" ]; then
add-apt-repository ppa:wireguard/wireguard
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' > /etc/apt/preferences.d/limit-unstable
apt-get update > /dev/null 2>&1
apt-get install -y "linux-headers-$(uname -r)" > /dev/null 2>&1
apt-get install -y wireguard iptables resolvconf --force-yes > /dev/null 2>&1