delete non-existing site using the core function

This commit is contained in:
Usman Nasir
2021-04-04 16:23:39 +05:00
parent 9c7736e77e
commit c38a017cec
3 changed files with 24 additions and 21 deletions

View File

@@ -284,6 +284,8 @@ password=%s""" % (rootdbpassword, rootdbpassword)
from plogical.acl import ACLManager
import validators
from plogical.vhost import vhost
currentACL = ACLManager.loadedACL(1)
allSite = ACLManager.findAllSites(currentACL, 1)
@@ -294,11 +296,7 @@ password=%s""" % (rootdbpassword, rootdbpassword)
self.PostStatus(
'Domain %s not found in Master, deleting data directories and configurations.' % (website))
command = 'rm -rf /home/%s' % (website)
ProcessUtilities.normalExecutioner(command)
command = 'rm -rf /%s/%s' % (ClusterManager.vhostConfPath, website)
ProcessUtilities.normalExecutioner(command)
vhost.deleteVirtualHostConfigurations(website)
self.PostStatus('All domains synced.')