mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
redis mh: change php version'
This commit is contained in:
@@ -73,7 +73,7 @@ class PHPManager:
|
||||
upload_max_filesize = ""
|
||||
max_input_time = ""
|
||||
|
||||
command = "sudo cat " + PHPManager.FindPHPFPMPath(phpVersion)
|
||||
command = "cat " + PHPManager.FindPHPFPMPath(phpVersion)
|
||||
|
||||
data = ProcessUtilities.outputExecutioner(command).split('\n')
|
||||
|
||||
|
||||
@@ -570,6 +570,7 @@ class vhost:
|
||||
return [0, str(msg) + " [IO Error with per host config file [changePHP]"]
|
||||
else:
|
||||
try:
|
||||
if not os.path.exists(vhost.redisConf):
|
||||
data = open(vhFile, "r").readlines()
|
||||
|
||||
php = PHPManager.getPHPString(phpVersion)
|
||||
@@ -598,6 +599,16 @@ class vhost:
|
||||
os.remove(phpDetachUpdatePath)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
command = 'redis-cli get "vhost:%s"' % (vhFile.split('/')[-2])
|
||||
configData = ProcessUtilities.outputExecutioner(command)
|
||||
|
||||
import re
|
||||
configData = re.sub(r'"phpVersion": .*,', '"phpVersion": %s,' % (phpVersion.lstrip('PHP ')), configData)
|
||||
|
||||
command = "redis-cli set vhost:%s '%s'" % (vhFile.split('/')[-2], configData)
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
|
||||
print("1,None")
|
||||
return 1, 'None'
|
||||
|
||||
@@ -39,7 +39,6 @@ from plogical.cronUtil import CronUtil
|
||||
from re import match,I,M
|
||||
from plogical import randomPassword
|
||||
from .StagingSetup import StagingSetup
|
||||
from plogical.vhost import vhost
|
||||
|
||||
|
||||
class WebsiteManager:
|
||||
|
||||
Reference in New Issue
Block a user