From 46688d121f9433b098e4f6cb7aa18983b8bc31e3 Mon Sep 17 00:00:00 2001 From: ALEXANDER MA COTE Date: Tue, 15 Jan 2019 10:57:50 -0500 Subject: [PATCH 1/2] Added arch linux support --- wireguard-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wireguard-install.sh b/wireguard-install.sh index ca804d9..5ecf49a 100755 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -32,6 +32,8 @@ if [ -e /etc/centos-release ]; then DISTRO="CentOS" elif [ -e /etc/debian_version ]; then DISTRO=$( lsb_release -is ) +elif [-e /etc/arch-release]; then + DISTRO="Arch" else echo "Your distribution is not supported (yet)" exit @@ -92,6 +94,9 @@ if [ ! -f "$WG_CONFIG" ]; 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 -y yum install wireguard-dkms qrencode wireguard-tools -y + elif [ "$DISTRO" == "Arch" ]; then + pacman -Sy wireguard-tools wireguard-dkms iptables + fi SERVER_PRIVKEY=$( wg genkey ) From 70c74ff9ea805c1410aad579cf2f526538494605 Mon Sep 17 00:00:00 2001 From: ALEXANDER MA COTE Date: Tue, 15 Jan 2019 11:02:43 -0500 Subject: [PATCH 2/2] fixed bash syntax --- wireguard-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 5ecf49a..d4a239a 100755 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -32,7 +32,7 @@ if [ -e /etc/centos-release ]; then DISTRO="CentOS" elif [ -e /etc/debian_version ]; then DISTRO=$( lsb_release -is ) -elif [-e /etc/arch-release]; then +elif [ -e /etc/arch-release ]; then DISTRO="Arch" else echo "Your distribution is not supported (yet)"