Update cyberpanel.sh

This commit is contained in:
qtwrk 2021-05-24 00:48:50 +02:00 committed by GitHub
parent 5125a3a073
commit 1a8230e4ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 8 deletions

View File

@ -5,7 +5,7 @@
#set -u
#CyberPanel installer script for CentOS 7.X, CentOS 8.X, CloudLinux 7.X, Ubuntu 18.04, Ubuntu 20.04 , Ubuntu 20.10 and AlmaLinux 8.X
#CyberPanel installer script for CentOS 7.X, CentOS 8.X, CloudLinux 7.X, RockyLinux 8.X, Ubuntu 18.04, Ubuntu 20.04 , Ubuntu 20.10 and AlmaLinux 8.X
#For whoever may edit this script, please follow :
#Please use Pre_Install_xxx() and Post_Install_xxx() if you want to something respectively before or after the panel installation
#and update below accordingly
@ -16,7 +16,7 @@
#Set_Default_Variables() ---> set some default variable for later use
#Check_Root() ---> check for root
#Check_Server_IP() ---> check for server IP and geolocation at country level
#Check_OS() ---> check system , support on centos7/8 ubutnu18/20 and cloudlinux 7 , 8 is untested.
#Check_OS() ---> check system , support on centos7/8, rockylinux 8.x , almalinux 8.x ubutnu18/20 and cloudlinux 7 , 8 is untested.
#Check_Virtualization() ---> check for virtualizaon , #LXC not supported# , some edit needed on OVZ
#Check_Panel() ---> check to make sure no other panel is installed
#Check_Process() ---> check no other process like Apache is running
@ -245,12 +245,14 @@ elif grep -q "AlmaLinux-8" /etc/os-release ; then
Server_OS="AlmaLinux"
elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
Server_OS="CloudLinux"
elif grep -q -E "Rocky Linux" /etc/os-release ; then
Server_OS="RockyLinux"
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10" /etc/os-release ; then
Server_OS="Ubuntu"
else
echo -e "Unable to detect your system..."
echo -e "\nCyberPanel is supported on Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, CentOS 7.x, CentOS 8.x, AlmaLinux 8.x and CloudLinux 7.x...\n"
Debug_Log2 "CyberPanel is supported on Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, CentOS 7.x, CentOS 8.x, AlmaLinux 8.x and CloudLinux 7.x... [404]"
echo -e "\nCyberPanel is supported on Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, CentOS 7.x, CentOS 8.x, AlmaLinux 8.x, RockyLinux 8.x and CloudLinux 7.x...\n"
Debug_Log2 "CyberPanel is supported on Ubuntu 18.04 x86_64, Ubuntu 20.04 x86_64, Ubuntu 20.10 x86_64, CentOS 7.x, CentOS 8.x, AlmaLinux 8.x, RockyLinux 8.x and CloudLinux 7.x... [404]"
exit
fi
@ -259,10 +261,10 @@ Server_OS_Version=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' |
echo -e "System: $Server_OS $Server_OS_Version detected...\n"
if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] ; then
if [[ $Server_OS = "CloudLinux" ]] || [[ "$Server_OS" = "AlmaLinux" ]] || [[ "$Server_OS" = "RockyLinux" ]] ; then
Server_OS="CentOS"
#CloudLinux gives version id like 7.8 , 7.9 , so cut it to show first number only
#treat CL and Alma as CentOS
#treat CL , Rocky and Alma as CentOS
fi
if [[ "$Debug" = "On" ]] ; then
@ -412,7 +414,7 @@ echo -e "\nThis will install LiteSpeed Enterise , replace LICENSE_KEY to actual
Check_Argument() {
if [[ "$#" = "0" ]] || [[ "$#" = "1" && "$1" = "--debug" ]] || [[ "$#" = "1" && "$1" = "--mirror" ]]; then
echo -e "\nInitializing...\n"
echo -e "\nInitialized...\n"
else
if [[ $1 = "help" ]]; then
Show_Help
@ -1064,7 +1066,13 @@ if [[ "$Server_OS" = "CentOS" ]] ; then
fi
#CentOS 7 specific change
if [[ "$Server_OS_Version" = "8" ]] ; then
:
if grep -q -E "Rocky Linux" /etc/os-release ; then
if [[ "$Server_Country" = "CN" ]] ; then
sed -i 's|rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://cyberpanel.sh/litespeed/litespeed_cn.repo|g' install.py
else
sed -i 's|rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://cyberpanel.sh/litespeed/litespeed.repo|g' install.py
fi
fi
fi
#CentOS 8 specific change