|
|
@@ -10,6 +10,7 @@
|
|
|
#
|
|
|
# Debian 9, 10, 11
|
|
|
# Ubuntu 18.04, 20.04, 22.04
|
|
|
+# AlmaLinux, EuroLinux, Red Hat EnterPrise Linux, Rocky Linux 8, 9
|
|
|
#
|
|
|
# ======================================================== #
|
|
|
|
|
|
@@ -40,13 +41,13 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ -z "$1" ]; then
|
|
|
fi
|
|
|
|
|
|
# Detect OS
|
|
|
-if [ -e "/etc/os-release" ]; then
|
|
|
+if [ -e "/etc/os-release" ] && [ ! -e "/etc/redhat-release" ]; then
|
|
|
type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
|
|
|
if [ "$type" = "ubuntu" ]; then
|
|
|
# Check if lsb_release is installed
|
|
|
if [ -e '/usr/bin/lsb_release' ]; then
|
|
|
release="$(lsb_release -s -r)"
|
|
|
- VERSION='ubuntu'
|
|
|
+ VERSION='ubuntu'
|
|
|
else
|
|
|
echo "lsb_release is currently not installed, please install it:"
|
|
|
echo "apt-get update && apt-get install lsb_release"
|
|
|
@@ -56,6 +57,21 @@ if [ -e "/etc/os-release" ]; then
|
|
|
release=$(cat /etc/debian_version|grep -o "[0-9]\{1,2\}"|head -n1)
|
|
|
VERSION='debian'
|
|
|
fi
|
|
|
+elif [ -e "/etc/os-release" ] && [ -e "/etc/redhat-release" ]; then
|
|
|
+ type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '"')
|
|
|
+ if [ "$type" = "rhel" ]; then
|
|
|
+ release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
|
|
|
+ VERSION='rhel'
|
|
|
+ elif [ "$type" = "almalinux" ]; then
|
|
|
+ release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
|
|
|
+ VERSION='almalinux'
|
|
|
+ elif [ "$type" = "eurolinux" ]; then
|
|
|
+ release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
|
|
|
+ VERSION='eurolinux'
|
|
|
+ elif [ "$type" = "rocky" ]; then
|
|
|
+ release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
|
|
|
+ VERSION='rockylinux'
|
|
|
+ fi
|
|
|
else
|
|
|
type="NoSupport"
|
|
|
fi
|
|
|
@@ -67,6 +83,8 @@ no_support_message(){
|
|
|
echo "****************************************************"
|
|
|
echo " Debian 10, 11"
|
|
|
echo " Ubuntu 18.04, 20.04, 22.04 LTS"
|
|
|
+ # Commenting this out for now
|
|
|
+ # echo " AlmaLinux, EuroLinux, Red Hat EnterPrise Linux, Rocky Linux 8,9"
|
|
|
echo ""
|
|
|
exit 1;
|
|
|
}
|
|
|
@@ -78,25 +96,47 @@ fi
|
|
|
check_wget_curl(){
|
|
|
# Check wget
|
|
|
if [ -e '/usr/bin/wget' ]; then
|
|
|
- wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type.sh -O hst-install-$type.sh
|
|
|
- if [ "$?" -eq '0' ]; then
|
|
|
- bash hst-install-$type.sh $*
|
|
|
- exit
|
|
|
+ if [ -e '/etc/redhat-release' ]; then
|
|
|
+ wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh -O hst-install-rhel.sh
|
|
|
+ if [ "$?" -eq '0' ]; then
|
|
|
+ bash hst-install-rhel.sh $*
|
|
|
+ exit
|
|
|
+ else
|
|
|
+ echo "Error: hst-install-rhel.sh download failed."
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
else
|
|
|
- echo "Error: hst-install-$type.sh download failed."
|
|
|
- exit 1
|
|
|
+ wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type.sh -O hst-install-$type.sh
|
|
|
+ if [ "$?" -eq '0' ]; then
|
|
|
+ bash hst-install-$type.sh $*
|
|
|
+ exit
|
|
|
+ else
|
|
|
+ echo "Error: hst-install-$type.sh download failed."
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
# Check curl
|
|
|
if [ -e '/usr/bin/curl' ]; then
|
|
|
- curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type.sh
|
|
|
- if [ "$?" -eq '0' ]; then
|
|
|
- bash hst-install-$type.sh $*
|
|
|
- exit
|
|
|
+ if [ -e '/etc/redhat-release' ]; then
|
|
|
+ curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh
|
|
|
+ if [ "$?" -eq '0' ]; then
|
|
|
+ bash hst-install-rhel.sh $*
|
|
|
+ exit
|
|
|
+ else
|
|
|
+ echo "Error: hst-install-rhel.sh download failed."
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
else
|
|
|
- echo "Error: hst-install-$type.sh download failed."
|
|
|
- exit 1
|
|
|
+ curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type.sh
|
|
|
+ if [ "$?" -eq '0' ]; then
|
|
|
+ bash hst-install-$type.sh $*
|
|
|
+ exit
|
|
|
+ else
|
|
|
+ echo "Error: hst-install-$type.sh download failed."
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
fi
|
|
|
fi
|
|
|
}
|
|
|
@@ -105,6 +145,8 @@ check_wget_curl(){
|
|
|
# of OS-specific installer, and throw error message if unsupported OS detected.
|
|
|
if [[ "$release" =~ ^(10|11|18.04|20.04|22.04)$ ]]; then
|
|
|
check_wget_curl $*
|
|
|
+elif [[ -e "/etc/redhat-release" ]] && [[ "$release" =~ ^(8|9)$ ]]; then
|
|
|
+ check_wget_curl $*
|
|
|
else
|
|
|
no_support_message
|
|
|
fi
|