Usman Nasir
2021-03-11 13:41:47 +05:00
parent c6e5de1b36
commit 1d18a1c2fb
6 changed files with 169 additions and 12 deletions

View File

@@ -535,13 +535,18 @@ class WebsiteManager:
admin = Administrator.objects.get(pk=userID)
websiteName = data['websiteName']
try:
DeleteDocRoot = int(data['DeleteDocRoot'])
except:
DeleteDocRoot = 0
if ACLManager.checkOwnership(websiteName, admin, currentACL) == 1:
pass
else:
return ACLManager.loadErrorJson('websiteDeleteStatus', 0)
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
execPath = execPath + " deleteDomain --virtualHostName " + websiteName
execPath = execPath + " deleteDomain --virtualHostName " + websiteName + ' --DeleteDocRoot %s' % (str(DeleteDocRoot))
ProcessUtilities.outputExecutioner(execPath)
data_ret = {'status': 1, 'websiteDeleteStatus': 1, 'error_message': "None"}