From f6c309404d3363f741cf8ef913550f59c377810f Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 27 Oct 2019 14:31:24 +0900 Subject: [PATCH] Update wireguard.sh --- wireguard.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wireguard.sh b/wireguard.sh index 42efca6..4c6147b 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -213,7 +213,12 @@ install_wg_1() { _error_detect "dnf -y install wireguard-dkms wireguard-tools" ;; centos) - _error_detect "curl -Lso /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo" + if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 7 ]; then + _error_detect "curl -Lso /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo" + fi + if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 8 ]; then + _error_detect "curl -Lso /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-8/jdoss-wireguard-epel-8.repo" + fi _error_detect "yum -y install epel-release" _error_detect "yum -y install kernel-devel" _error_detect "yum -y install kernel-headers"