diff --git a/install.sh b/install.sh index 7cae2a568..426e97cc9 100644 --- a/install.sh +++ b/install.sh @@ -30,6 +30,9 @@ elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then apt install -y -qq wget curl SERVER_OS="Ubuntu" elif echo $OUTPUT | grep -q "Ubuntu 20.04" ; then +apt install -y -qq wget curl + SERVER_OS="Ubuntu" +elif echo $OUTPUT | grep -q "Ubuntu 22.04" ; then apt install -y -qq wget curl SERVER_OS="Ubuntu" elif echo $OUTPUT | grep -q "openEuler 20.03" ; then diff --git a/install/install.py b/install/install.py index bd84fc23a..6011c9ce0 100755 --- a/install/install.py +++ b/install/install.py @@ -34,6 +34,7 @@ def generate_pass(length=14): ubuntu = 1 cent8 = 2 openeuler = 3 +CloudLinux8 = 0 def get_distro(): @@ -52,12 +53,15 @@ def get_distro(): data = open('/etc/redhat-release', 'r').read() + if data.find('CentOS Linux release 8') > -1: return cent8 if data.find('AlmaLinux release 8') > -1: return cent8 if data.find('Rocky Linux release 8') > -1 or data.find('Rocky Linux 8') > -1 or data.find('rocky:8') > -1: return cent8 + if data.find('CloudLinux 8') or data.find('cloudlinux 8'): + return cent8 else: if exists("/etc/openEuler-release"): diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 8794648be..9ec655cd7 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -40,6 +40,15 @@ def get_Ubuntu_release(): class InstallCyberPanel: mysql_Root_password = "" mysqlPassword = "" + CloudLinux8 = 0 + + @staticmethod + def OSFlags(): + if os.path.exists("/etc/redhat-release"): + data = open('/etc/redhat-release', 'r').read() + + if data.find('CloudLinux 8') > -1 or data.find('cloudlinux 8') > -1: + InstallCyberPanel.CloudLinux8 = 1 def __init__(self, rootPath, cwd, distro, ent, serial=None, port=None, ftp=None, dns=None, publicip=None, remotemysql=None, mysqlhost=None, mysqldb=None, mysqluser=None, mysqlpassword=None, mysqlport=None): @@ -59,6 +68,10 @@ def __init__(self, rootPath, cwd, distro, ent, serial=None, port=None, ftp=None, self.mysqlport = mysqlport self.mysqldb = mysqldb + ## TURN ON OS FLAGS FOR SPECIFIC NEEDS LATER + + InstallCyberPanel.OSFlags() + @staticmethod def stdOut(message, log=0, exit=0, code=os.EX_OK): install.preFlightsChecks.stdOut(message, log, exit, code)