mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update wireguard.sh
This commit is contained in:
parent
811a96200a
commit
47505558cc
10
wireguard.sh
10
wireguard.sh
@ -220,7 +220,7 @@ check_os() {
|
||||
# Check linux kernel version
|
||||
check_kernel_version() {
|
||||
kernel_version="$(uname -r | cut -d- -f1)"
|
||||
if _version_ge ${kernel_version} 5.6; then
|
||||
if _version_ge ${kernel_version} 5.6.0; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@ -791,10 +791,12 @@ Options:
|
||||
}
|
||||
|
||||
install_from_repo() {
|
||||
_is_installed && check_version && _red "WireGuard was already installed\n" && exit 0
|
||||
check_os
|
||||
_is_installed
|
||||
rt=$?
|
||||
if [ ${rt} -eq 0 ]; then
|
||||
_red "WireGuard was already installed\n" && exit 0
|
||||
fi
|
||||
if check_kernel_version && [ ${rt} -eq 2 ]; then
|
||||
install_wg_3
|
||||
else
|
||||
@ -809,10 +811,12 @@ install_from_repo() {
|
||||
}
|
||||
|
||||
install_from_source() {
|
||||
_is_installed && check_version && _red "WireGuard was already installed\n" && exit 0
|
||||
check_os
|
||||
_is_installed
|
||||
rt=$?
|
||||
if [ ${rt} -eq 0 ]; then
|
||||
_red "WireGuard was already installed\n" && exit 0
|
||||
fi
|
||||
if check_kernel_version && [ ${rt} -eq 2 ]; then
|
||||
install_wg_4
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user