mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 08:46:09 +01:00
CP Packages on Cent7
This commit is contained in:
@@ -753,6 +753,8 @@ def fetchPackages(request):
|
|||||||
upgradePackages.append(pack)
|
upgradePackages.append(pack)
|
||||||
|
|
||||||
packages = upgradePackages
|
packages = upgradePackages
|
||||||
|
|
||||||
|
|
||||||
elif ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
elif ProcessUtilities.decideDistro() == ProcessUtilities.centos:
|
||||||
|
|
||||||
### Check Package Lock status
|
### Check Package Lock status
|
||||||
@@ -823,6 +825,9 @@ def fetchPackages(request):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
startForUpdate = startForUpdate + 1
|
startForUpdate = startForUpdate + 1
|
||||||
|
elif type == 'CyberPanel':
|
||||||
|
command = 'cat /usr/local/CyberCP/CPCent7repo.json'
|
||||||
|
packages = json.loads(ProcessUtilities.outputExecutioner(command))
|
||||||
|
|
||||||
## make list of packages that need update
|
## make list of packages that need update
|
||||||
|
|
||||||
@@ -923,6 +928,24 @@ def fetchPackages(request):
|
|||||||
checker = 1
|
checker = 1
|
||||||
else:
|
else:
|
||||||
json_data = json_data + ',' + json.dumps(dic)
|
json_data = json_data + ',' + json.dumps(dic)
|
||||||
|
elif type == 'CyberPanel':
|
||||||
|
|
||||||
|
packageName = items['Package']
|
||||||
|
|
||||||
|
if packageName.split('.')[0] in locked:
|
||||||
|
lock = 1
|
||||||
|
else:
|
||||||
|
lock = 0
|
||||||
|
|
||||||
|
dic = {'package': packageName,
|
||||||
|
'version': items['Version'], 'lock': lock}
|
||||||
|
|
||||||
|
counter = counter + 1
|
||||||
|
if checker == 0:
|
||||||
|
json_data = json_data + json.dumps(dic)
|
||||||
|
checker = 1
|
||||||
|
else:
|
||||||
|
json_data = json_data + ',' + json.dumps(dic)
|
||||||
|
|
||||||
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user