delete docker sites folder if exists on website deletion

This commit is contained in:
usmannasir
2025-04-15 12:49:04 +05:00
parent 64b65ee600
commit b6320af94b

View File

@@ -448,6 +448,11 @@ class vhost:
if os.path.exists('/root/.acme.sh/%s' % (virtualHostName)):
shutil.rmtree('/root/.acme.sh/%s' % (virtualHostName))
### Delete Docker Sites
if os.path.exists('/home/docker/%s' % (virtualHostName)):
shutil.rmtree('/home/docker/%s' % (virtualHostName))
except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [Not able to remove virtual host configuration from main configuration file.]")
return 0