From 1a484a642fd20ae751433d1c7b4e2d2235485b9f Mon Sep 17 00:00:00 2001 From: Nyr Date: Tue, 23 Apr 2024 16:44:52 +0200 Subject: [PATCH] Improve error message --- openvpn-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index ff56a66..5c4d5da 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -57,8 +57,9 @@ This version of Debian is too old and unsupported." fi if [[ "$os" == "centos" && "$os_version" -lt 9 ]]; then - echo "CentOS 9 or higher is required to use this installer. -This version of CentOS is too old and unsupported." + os_name=$(sed 's/ release.*//' /etc/almalinux-release /etc/rocky-release /etc/centos-release 2>/dev/null | head -1) + echo "$os_name 9 or higher is required to use this installer. +This version of $os_name is too old and unsupported." exit fi