mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
Update views.py
centos 8
This commit is contained in:
@@ -1085,7 +1085,7 @@ def installExtensions(request):
|
|||||||
|
|
||||||
phpPath = ''
|
phpPath = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8
|
||||||
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php70.xml')
|
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php70.xml')
|
||||||
else:
|
else:
|
||||||
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp70.xml')
|
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp70.xml')
|
||||||
@@ -1116,7 +1116,7 @@ def installExtensions(request):
|
|||||||
|
|
||||||
phpPath = ''
|
phpPath = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php71.xml')
|
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php71.xml')
|
||||||
else:
|
else:
|
||||||
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp71.xml')
|
phpPath = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp71.xml')
|
||||||
@@ -1144,7 +1144,7 @@ def installExtensions(request):
|
|||||||
|
|
||||||
php72Path = ''
|
php72Path = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
php72Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php72.xml')
|
php72Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php72.xml')
|
||||||
else:
|
else:
|
||||||
php72Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp72.xml')
|
php72Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp72.xml')
|
||||||
@@ -1172,7 +1172,7 @@ def installExtensions(request):
|
|||||||
|
|
||||||
php73Path = ''
|
php73Path = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
php73Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php73.xml')
|
php73Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php73.xml')
|
||||||
else:
|
else:
|
||||||
php73Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp73.xml')
|
php73Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp73.xml')
|
||||||
@@ -1200,7 +1200,7 @@ def installExtensions(request):
|
|||||||
|
|
||||||
php74Path = ''
|
php74Path = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
php74Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php74.xml')
|
php74Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php74.xml')
|
||||||
else:
|
else:
|
||||||
php74Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp74.xml')
|
php74Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp74.xml')
|
||||||
@@ -1344,7 +1344,7 @@ def getRequestStatus(request):
|
|||||||
|
|
||||||
checkCommand = ''
|
checkCommand = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
checkCommand = 'yum list installed'
|
checkCommand = 'yum list installed'
|
||||||
checkCommand = shlex.split(checkCommand)
|
checkCommand = shlex.split(checkCommand)
|
||||||
else:
|
else:
|
||||||
@@ -1469,7 +1469,7 @@ def getRequestStatusApache(request):
|
|||||||
|
|
||||||
checkCommand = ''
|
checkCommand = ''
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
checkCommand = 'yum list installed'
|
checkCommand = 'yum list installed'
|
||||||
checkCommand = shlex.split(checkCommand)
|
checkCommand = shlex.split(checkCommand)
|
||||||
else:
|
else:
|
||||||
@@ -1607,7 +1607,7 @@ def getCurrentPHPConfig(request):
|
|||||||
|
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
else:
|
else:
|
||||||
initial = phpVers[3]
|
initial = phpVers[3]
|
||||||
@@ -1767,7 +1767,7 @@ def getCurrentAdvancedPHPConfig(request):
|
|||||||
|
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
else:
|
else:
|
||||||
initial = phpVers[3]
|
initial = phpVers[3]
|
||||||
@@ -1809,7 +1809,7 @@ def savePHPConfigAdvance(request):
|
|||||||
|
|
||||||
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
phpVers = "php" + PHPManager.getPHPString(phpVers)
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||||
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
|
||||||
else:
|
else:
|
||||||
initial = phpVers[3]
|
initial = phpVers[3]
|
||||||
|
|||||||
Reference in New Issue
Block a user