mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 09:46:11 +01:00
redis: delete vhost
This commit is contained in:
@@ -368,6 +368,7 @@ class vhost:
|
|||||||
|
|
||||||
DNS.deleteDNSZone(virtualHostName)
|
DNS.deleteDNSZone(virtualHostName)
|
||||||
|
|
||||||
|
if not os.path.exists(vhost.redisConf):
|
||||||
installUtilities.installUtilities.reStartLiteSpeed()
|
installUtilities.installUtilities.reStartLiteSpeed()
|
||||||
|
|
||||||
## Delete mail accounts
|
## Delete mail accounts
|
||||||
@@ -482,6 +483,7 @@ class vhost:
|
|||||||
logging.CyberCPLogFileWriter.writeToFile(
|
logging.CyberCPLogFileWriter.writeToFile(
|
||||||
str(msg) + " [Not able to remove virtual host directory from /home continuing..]")
|
str(msg) + " [Not able to remove virtual host directory from /home continuing..]")
|
||||||
|
|
||||||
|
if not os.path.exists(vhost.redisConf):
|
||||||
try:
|
try:
|
||||||
confPath = vhost.Server_root + "/conf/vhosts/" + virtualHostName
|
confPath = vhost.Server_root + "/conf/vhosts/" + virtualHostName
|
||||||
shutil.rmtree(confPath)
|
shutil.rmtree(confPath)
|
||||||
@@ -507,6 +509,9 @@ class vhost:
|
|||||||
str(msg) + " [Not able to remove virtual host configuration from main configuration file.]")
|
str(msg) + " [Not able to remove virtual host configuration from main configuration file.]")
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
else:
|
||||||
|
command = 'redis-cli delete "vhost:%s"' % (virtualHostName)
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def checkIfVirtualHostExists(virtualHostName):
|
def checkIfVirtualHostExists(virtualHostName):
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ pm.max_spare_servers = {pmMaxSpareServers}
|
|||||||
ServerAdmin {administratorEmail}
|
ServerAdmin {administratorEmail}
|
||||||
CustomLog /home/{masterDomain}/logs/{masterDomain}.access_log combined
|
CustomLog /home/{masterDomain}/logs/{masterDomain}.access_log combined
|
||||||
<IfModule LiteSpeed>
|
<IfModule LiteSpeed>
|
||||||
CacheRoot lscache
|
CacheRoot /home/{masterDomain}/lscache
|
||||||
</IfModule>
|
</IfModule>
|
||||||
}
|
}
|
||||||
}'"""
|
}'"""
|
||||||
Reference in New Issue
Block a user