mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-09 14:56:10 +01:00
Add path option to createChild function
This commit is contained in:
@@ -75,14 +75,13 @@ class cyberPanel:
|
|||||||
logger.writeforCLI(str(msg), "Error", stack()[0][3])
|
logger.writeforCLI(str(msg), "Error", stack()[0][3])
|
||||||
self.printStatus(0, str(msg))
|
self.printStatus(0, str(msg))
|
||||||
|
|
||||||
def createDomain(self, masterDomain, domainName, owner, php, ssl, dkim, openBasedir):
|
def createDomain(self, masterDomain, domainName, owner, php, ssl, dkim, openBasedir, path):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
path = '/home/' + masterDomain + '/public_html/' + domainName
|
complete_path = '/home/' + masterDomain + '/' + path
|
||||||
phpSelection = 'PHP ' + php
|
phpSelection = 'PHP ' + php
|
||||||
|
|
||||||
result = virtualHostUtilities.createDomain(masterDomain, domainName, phpSelection, path, ssl, dkim,
|
result = virtualHostUtilities.createDomain(masterDomain, domainName, phpSelection, complete_path, ssl, dkim, openBasedir, owner, 0)
|
||||||
openBasedir, owner, 0)
|
|
||||||
|
|
||||||
if result[0] == 1:
|
if result[0] == 1:
|
||||||
self.printStatus(1, 'None')
|
self.printStatus(1, 'None')
|
||||||
@@ -921,7 +920,12 @@ def main():
|
|||||||
else:
|
else:
|
||||||
openBasedir = 0
|
openBasedir = 0
|
||||||
|
|
||||||
cyberpanel.createDomain(args.masterDomain, args.childDomain, args.owner, args.php, ssl, dkim, openBasedir)
|
if args.path:
|
||||||
|
path = args.path
|
||||||
|
else:
|
||||||
|
path = "public_html/" + args.childDomain
|
||||||
|
|
||||||
|
cyberpanel.createDomain(args.masterDomain, args.childDomain, args.owner, args.php, ssl, dkim, openBasedir, path)
|
||||||
elif args.function == "deleteChild":
|
elif args.function == "deleteChild":
|
||||||
|
|
||||||
completeCommandExample = 'cyberpanel deleteChild --childDomain cyberpanel.net'
|
completeCommandExample = 'cyberpanel deleteChild --childDomain cyberpanel.net'
|
||||||
|
|||||||
Reference in New Issue
Block a user