mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
suspend child domains along with master website
This commit is contained in:
@@ -553,19 +553,37 @@ class WebsiteManager:
|
||||
|
||||
if state == "Suspend":
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + websiteName
|
||||
command = "sudo mv " + confPath + " " + confPath + "-suspended"
|
||||
command = "mv " + confPath + " " + confPath + "-suspended"
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
childDomains = website.childdomains_set.all()
|
||||
|
||||
for items in childDomains:
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + items.domain
|
||||
command = "mv " + confPath + " " + confPath + "-suspended"
|
||||
|
||||
installUtilities.reStartLiteSpeedSocket()
|
||||
website.state = 0
|
||||
else:
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + websiteName
|
||||
|
||||
command = "sudo mv " + confPath + "-suspended" + " " + confPath
|
||||
command = "mv " + confPath + "-suspended" + " " + confPath
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = "chown -R " + "lsadm" + ":" + "lsadm" + " " + confPath
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
childDomains = website.childdomains_set.all()
|
||||
|
||||
for items in childDomains:
|
||||
confPath = virtualHostUtilities.Server_root + "/conf/vhosts/" + items.domain
|
||||
|
||||
command = "mv " + confPath + "-suspended" + " " + confPath
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = "chown -R " + "lsadm" + ":" + "lsadm" + " " + confPath
|
||||
ProcessUtilities.popenExecutioner(command)
|
||||
|
||||
installUtilities.reStartLiteSpeedSocket()
|
||||
website.state = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user