mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-06-27 19:39:36 +02:00
cloudlinux 8 based install
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -34,6 +34,7 @@ centos = 0
|
||||
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"):
|
||||
|
||||
@@ -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 @@ class InstallCyberPanel:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user