mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 01:06:09 +01:00
feature: allow custom path for child-domains
This commit is contained in:
@@ -19,7 +19,7 @@ from plogical.processUtilities import ProcessUtilities
|
|||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
VERSION = '2.0'
|
VERSION = '2.0'
|
||||||
BUILD = 0
|
BUILD = 1
|
||||||
|
|
||||||
@ensure_csrf_cookie
|
@ensure_csrf_cookie
|
||||||
def renderBase(request):
|
def renderBase(request):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from stat import *
|
|||||||
import stat
|
import stat
|
||||||
|
|
||||||
VERSION = '2.0'
|
VERSION = '2.0'
|
||||||
BUILD = 0
|
BUILD = 1
|
||||||
|
|
||||||
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz',
|
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz',
|
||||||
'nums': '0123456789',
|
'nums': '0123456789',
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from django.utils import translation
|
|||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
VERSION = '2.0'
|
VERSION = '2.0'
|
||||||
BUILD = 0
|
BUILD = 1
|
||||||
|
|
||||||
def verifyLogin(request):
|
def verifyLogin(request):
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from packages.models import Package
|
|||||||
from baseTemplate.models import version
|
from baseTemplate.models import version
|
||||||
|
|
||||||
VERSION = '2.0'
|
VERSION = '2.0'
|
||||||
BUILD = 0
|
BUILD = 1
|
||||||
|
|
||||||
if not os.geteuid() == 0:
|
if not os.geteuid() == 0:
|
||||||
sys.exit("\nOnly root can run this script\n")
|
sys.exit("\nOnly root can run this script\n")
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import random
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
VERSION = '2.0'
|
VERSION = '2.0'
|
||||||
BUILD = 0
|
BUILD = 1
|
||||||
|
|
||||||
class Upgrade:
|
class Upgrade:
|
||||||
logPath = "/usr/local/lscp/logs/upgradeLog"
|
logPath = "/usr/local/lscp/logs/upgradeLog"
|
||||||
|
|||||||
@@ -857,7 +857,7 @@ class vhost:
|
|||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
command = "chmod 755 %s" % (path)
|
command = "chmod 750 %s" % (path)
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
subprocess.call(cmd, stdout=FNULL, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
<div ng-hide="installationDetailsForm" class="form-group">
|
||||||
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
|
<label class="col-sm-3 control-label">{% trans "Path" %}: /home/{{ domain }}/ </label>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<input placeholder="{% trans 'This path is relative to: ' %}{$ masterDomain $}. {% trans 'Leave empty to set default.' %}"
|
<input placeholder="{% trans 'This path is relative to: ' %}{$ masterDomain $}. {% trans 'Leave empty to set default.' %}"
|
||||||
type="text" class="form-control" ng-model="docRootPath" required>
|
type="text" class="form-control" ng-model="docRootPath" required>
|
||||||
|
|||||||
@@ -285,9 +285,9 @@ class WebsiteManager:
|
|||||||
|
|
||||||
if len(path) > 0:
|
if len(path) > 0:
|
||||||
path = path.lstrip("/")
|
path = path.lstrip("/")
|
||||||
path = "/home/" + masterDomain + "/public_html/" + path
|
path = "/home/" + masterDomain + "/" + path
|
||||||
else:
|
else:
|
||||||
path = "/home/" + masterDomain + "/public_html/" + domain
|
path = "/home/" + masterDomain + "/" + domain
|
||||||
|
|
||||||
try:
|
try:
|
||||||
apacheBackend = str(data['apacheBackend'])
|
apacheBackend = str(data['apacheBackend'])
|
||||||
|
|||||||
Reference in New Issue
Block a user