delete non-existing site using the core function

This commit is contained in:
Usman Nasir
2021-04-04 16:33:36 +05:00
parent c38a017cec
commit 544732efa3

View File

@@ -284,8 +284,6 @@ 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)
@@ -296,7 +294,11 @@ password=%s""" % (rootdbpassword, rootdbpassword)
self.PostStatus(
'Domain %s not found in Master, deleting data directories and configurations.' % (website))
vhost.deleteVirtualHostConfigurations(website)
command = 'rm -rf /home/%s' % (website)
ProcessUtilities.normalExecutioner(command)
command = 'rm -rf /%s/%s' % (ClusterManager.vhostConfPath, website)
ProcessUtilities.normalExecutioner(command)
self.PostStatus('All domains synced.')