mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-28 07:46:35 +00:00
parent
ac1fb87a4c
commit
46bd2cec69
@ -86,23 +86,23 @@ if [[ "$OS" = 'ubuntu' ]]; then
|
||||
add-apt-repository ppa:wireguard/wireguard
|
||||
apt-get update
|
||||
apt-get install "linux-headers-$(uname -r)"
|
||||
apt-get install wireguard iptables resolvconf
|
||||
apt-get install wireguard iptables resolvconf qrencode
|
||||
elif [[ "$OS" = 'debian' ]]; then
|
||||
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
|
||||
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
|
||||
apt update
|
||||
apt-get install "linux-headers-$(uname -r)"
|
||||
apt install wireguard iptables resolvconf
|
||||
apt install wireguard iptables resolvconf qrencode
|
||||
elif [[ "$OS" = 'fedora' ]]; then
|
||||
dnf copr enable jdoss/wireguard
|
||||
dnf install wireguard-dkms wireguard-tools iptables
|
||||
dnf install wireguard-dkms wireguard-tools iptables qrencode
|
||||
elif [[ "$OS" = 'centos' ]]; then
|
||||
curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
|
||||
yum install epel-release
|
||||
yum install wireguard-dkms wireguard-tools iptables
|
||||
yum install wireguard-dkms wireguard-tools iptables qrencode
|
||||
elif [[ "$OS" = 'arch' ]]; then
|
||||
pacman -S linux-headers
|
||||
pacman -S wireguard-tools iptables wireguard-arch
|
||||
pacman -S wireguard-tools iptables wireguard-arch qrencode
|
||||
fi
|
||||
|
||||
# Make sure the directory exists (this does not seem the be the case on fedora)
|
||||
@ -160,3 +160,7 @@ sysctl --system
|
||||
|
||||
systemctl start "wg-quick@$SERVER_WG_NIC"
|
||||
systemctl enable "wg-quick@$SERVER_WG_NIC"
|
||||
|
||||
echo "Here is your client config file as a QR Code:"
|
||||
|
||||
qrencode -t ansiutf8 -l L < "$HOME/$SERVER_WG_NIC-client.conf"
|
||||
|
Loading…
Reference in New Issue
Block a user