Skip to content

Commit

Permalink
cloudlinux 8 based install
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Sep 19, 2023
1 parent 0fc4b91 commit 48f328b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def generate_pass(length=14):
ubuntu = 1
cent8 = 2
openeuler = 3
CloudLinux8 = 0


def get_distro():
Expand All @@ -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"):
Expand Down
13 changes: 13 additions & 0 deletions install/installCyberPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit 48f328b

Please sign in to comment.