mirror of
https://github.com/hwdsl2/setup-ipsec-vpn.git
synced 2026-05-17 08:05:45 +03:00
Update OS support
- Add Alpine Linux 3.22 and remove 3.20 - Cleanup
This commit is contained in:
@@ -103,13 +103,10 @@ EOF
|
||||
esac
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
|
||||
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.20/3.21."
|
||||
fi
|
||||
else
|
||||
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
||||
if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "stretchsid" ] \
|
||||
|| [ "$os_ver" = "bustersid" ]; then
|
||||
|| [ "$os_ver" = "bustersid" ] || [ -z "$os_ver" ]; then
|
||||
cat 1>&2 <<EOF
|
||||
Error: This script requires Debian >= 10 or Ubuntu >= 20.04.
|
||||
This version of Ubuntu/Debian is too old and not supported.
|
||||
@@ -172,7 +169,7 @@ confirm_or_abort() {
|
||||
show_header() {
|
||||
cat <<'EOF'
|
||||
|
||||
IKEv2 Script Copyright (c) 2020-2025 Lin Song 12 May 2025
|
||||
IKEv2 Script Copyright (c) 2020-2025 Lin Song 1 Sep 2025
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -89,12 +89,7 @@ EOF
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
|
||||
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.20/3.21."
|
||||
fi
|
||||
else
|
||||
if [ "$os_type" != "alpine" ]; then
|
||||
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
||||
if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "stretchsid" ] \
|
||||
|| [ "$os_ver" = "bustersid" ] || [ -z "$os_ver" ]; then
|
||||
|
||||
@@ -51,9 +51,6 @@ check_os() {
|
||||
;;
|
||||
esac
|
||||
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
|
||||
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.20/3.21."
|
||||
fi
|
||||
}
|
||||
|
||||
check_libreswan() {
|
||||
|
||||
@@ -123,8 +123,8 @@ EOF
|
||||
esac
|
||||
if [ "$os_type" = "alpine" ]; then
|
||||
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
|
||||
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.20/3.21."
|
||||
if [ "$os_ver" != "3.21" ] && [ "$os_ver" != "3.22" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.21/3.22."
|
||||
fi
|
||||
else
|
||||
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
||||
|
||||
@@ -70,8 +70,8 @@ check_os() {
|
||||
;;
|
||||
esac
|
||||
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
|
||||
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.20/3.21."
|
||||
if [ "$os_ver" != "3.21" ] && [ "$os_ver" != "3.22" ]; then
|
||||
exiterr "This script only supports Alpine Linux 3.21/3.22."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user