@@ -55,22 +55,24 @@ if [ -e "/etc/os-release" ] && [ ! -e "/etc/redhat-release" ]; then
5555 elif [ " $type " = " debian" ]; then
5656 release=$( cat /etc/debian_version | grep -o " [0-9]\{1,2\}" | head -n1)
5757 VERSION=' debian'
58+ else
59+ type=" NoSupport"
5860 fi
59- elif [ -e " /etc/os-release" ] && [ -e " /etc/redhat-release" ]; then
60- type=$( grep " ^ID=" /etc/os-release | cut -f 2 -d ' "' )
61- if [ " $type " = " rhel" ]; then
62- release=$( cat /etc/redhat-release | cut -f 1 -d ' .' | awk ' {print $3}' )
63- VERSION=' rhel'
64- elif [ " $type " = " almalinux" ]; then
65- release=$( cat /etc/redhat-release | cut -f 1 -d ' .' | awk ' {print $3}' )
66- VERSION=' almalinux'
67- elif [ " $type " = " eurolinux" ]; then
68- release=$( cat /etc/redhat-release | cut -f 1 -d ' .' | awk ' {print $3}' )
69- VERSION=' eurolinux'
70- elif [ " $type " = " rocky" ]; then
71- release=$( cat /etc/redhat-release | cut -f 1 -d ' .' | awk ' {print $3}' )
72- VERSION=' rockylinux'
73- fi
61+ # elif [ -e "/etc/os-release" ] && [ -e "/etc/redhat-release" ]; then
62+ # type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '"')
63+ # if [ "$type" = "rhel" ]; then
64+ # release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
65+ # VERSION='rhel'
66+ # elif [ "$type" = "almalinux" ]; then
67+ # release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
68+ # VERSION='almalinux'
69+ # elif [ "$type" = "eurolinux" ]; then
70+ # release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
71+ # VERSION='eurolinux'
72+ # elif [ "$type" = "rocky" ]; then
73+ # release=$(cat /etc/redhat-release | cut -f 1 -d '.' | awk '{print $3}')
74+ # VERSION='rockylinux'
75+ # fi
7476else
7577 type=" NoSupport"
7678fi
9597check_wget_curl () {
9698 # Check wget
9799 if [ -e ' /usr/bin/wget' ]; then
98- if [ -e ' /etc/redhat-release' ]; then
99- wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh -O hst-install-rhel.sh
100- if [ " $? " -eq ' 0' ]; then
101- bash hst-install-rhel.sh $*
102- exit
103- else
104- echo " Error: hst-install-rhel.sh download failed."
105- exit 1
106- fi
100+ # if [ -e '/etc/redhat-release' ]; then
101+ # wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh -O hst-install-rhel.sh
102+ # if [ "$?" -eq '0' ]; then
103+ # bash hst-install-rhel.sh $*
104+ # exit
105+ # else
106+ # echo "Error: hst-install-rhel.sh download failed."
107+ # exit 1
108+ # fi
109+ # else
110+ wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type .sh -O hst-install-$type .sh
111+ if [ " $? " -eq ' 0' ]; then
112+ bash hst-install-$type .sh $*
113+ exit
107114 else
108- wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type .sh -O hst-install-$type .sh
109- if [ " $? " -eq ' 0' ]; then
110- bash hst-install-$type .sh $*
111- exit
112- else
113- echo " Error: hst-install-$type .sh download failed."
114- exit 1
115- fi
115+ echo " Error: hst-install-$type .sh download failed."
116+ exit 1
116117 fi
118+ # fi
117119 fi
118120
119121 # Check curl
120122 if [ -e ' /usr/bin/curl' ]; then
121- if [ -e ' /etc/redhat-release' ]; then
122- curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh
123- if [ " $? " -eq ' 0' ]; then
124- bash hst-install-rhel.sh $*
125- exit
126- else
127- echo " Error: hst-install-rhel.sh download failed."
128- exit 1
129- fi
123+ # if [ -e '/etc/redhat-release' ]; then
124+ # curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-rhel.sh
125+ # if [ "$?" -eq '0' ]; then
126+ # bash hst-install-rhel.sh $*
127+ # exit
128+ # else
129+ # echo "Error: hst-install-rhel.sh download failed."
130+ # exit 1
131+ # fi
132+ # else
133+ curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type .sh
134+ if [ " $? " -eq ' 0' ]; then
135+ bash hst-install-$type .sh $*
136+ exit
130137 else
131- curl -s -O https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install-$type .sh
132- if [ " $? " -eq ' 0' ]; then
133- bash hst-install-$type .sh $*
134- exit
135- else
136- echo " Error: hst-install-$type .sh download failed."
137- exit 1
138- fi
138+ echo " Error: hst-install-$type .sh download failed."
139+ exit 1
139140 fi
141+ # fi
140142 fi
141143}
142144
143145# Check for supported operating system before proceeding with download
144146# of OS-specific installer, and throw error message if unsupported OS detected.
145147if [[ " $release " =~ ^(10| 11| 12| 20.04| 22.04| 24.04)$ ]]; then
146148 check_wget_curl $*
147- elif [[ -e " /etc/redhat-release" ]] && [[ " $release " =~ ^(8| 9)$ ]]; then
148- check_wget_curl $*
149+ # elif [[ -e "/etc/redhat-release" ]] && [[ "$release" =~ ^(8|9)$ ]]; then
150+ # check_wget_curl $*
149151else
150152 no_support_message
151153fi
0 commit comments