From 88b7f8ae2d4ab0b90279243a7fbdf3674e4ad72b Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sat, 23 Nov 2024 16:02:29 +0900 Subject: [PATCH] Update wireguard.sh --- wireguard.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/wireguard.sh b/wireguard.sh index 6c3ea27..e4fe1a5 100644 --- a/wireguard.sh +++ b/wireguard.sh @@ -2,7 +2,7 @@ # # This is a Shell script for configure and start WireGuard VPN server. # -# Copyright (C) 2019 - 2020 Teddysun +# Copyright (C) 2019 - 2024 Teddysun # # Reference URL: # https://www.wireguard.com @@ -296,6 +296,9 @@ install_wg_pkgs() { if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 8 ]; then yum-config-manager --enable PowerTools > /dev/null 2>&1 || yum-config-manager --enable powertools > /dev/null 2>&1 fi + if [ -n "$(_os_ver)" -a "$(_os_ver)" -eq 9 ]; then + yum-config-manager --enable crb > /dev/null 2>&1 + fi _error_detect "yum -y install libmnl-devel" _error_detect "yum -y install elfutils-libelf-devel" [ ! -d "/usr/src/kernels/$(uname -r)" ] && _error_detect "yum -y install kernel-headers" && _error_detect "yum -y install kernel-devel" @@ -474,9 +477,9 @@ EOF # Create client interface create_client_if() { - _info "Create client interface: /etc/wireguard/${SERVER_WG_NIC}_client" + _info "Create client interface: /etc/wireguard/${SERVER_WG_NIC}_client.conf" if [ -n "${SERVER_PUB_IPV6}" ]; then - cat > /etc/wireguard/${SERVER_WG_NIC}_client < /etc/wireguard/${SERVER_WG_NIC}_client.conf < /etc/wireguard/${SERVER_WG_NIC}_client < /etc/wireguard/${SERVER_WG_NIC}_client.conf <