mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-09 06:46:10 +01:00
bug fix: increase size of external app
This commit is contained in:
@@ -1552,6 +1552,14 @@ class FirewallManager:
|
|||||||
else:
|
else:
|
||||||
return ACLManager.loadError()
|
return ACLManager.loadError()
|
||||||
|
|
||||||
return render(self.request, 'firewall/imunify.html', {})
|
ipFile = "/etc/cyberpanel/machineIP"
|
||||||
|
f = open(ipFile)
|
||||||
|
ipData = f.read()
|
||||||
|
ipAddress = ipData.split('\n', 1)[0]
|
||||||
|
|
||||||
|
data = {}
|
||||||
|
data['ipAddress'] = ipAddress
|
||||||
|
|
||||||
|
return render(self.request, 'firewall/imunify.html', data)
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
return HttpResponse(str(msg))
|
return HttpResponse(str(msg))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "baseTemplate/index.html" %}
|
{% extends "baseTemplate/index.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block title %}{% trans "CloudLinux - CyberPanel" %}{% endblock %}
|
{% block title %}{% trans "Imunify - CyberPanel" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
@@ -10,20 +10,20 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="page-title">
|
<div id="page-title">
|
||||||
<h2>{% trans "CloudLinux" %}</h2>
|
<h2>{% trans "Imunify" %}</h2>
|
||||||
<p>{% trans "Access LVEManager" %}</p>
|
<p>{% trans "Access Imunify" %}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h3 class="title-hero">
|
<h3 class="title-hero">
|
||||||
{% trans "CloudLinux" %}
|
{% trans "Imunify" %}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="example-box-wrapper">
|
<div class="example-box-wrapper">
|
||||||
|
|
||||||
<p>{% trans "CloudLinux is now integrated via their new API. You can manage CageFS and Package limits directly from LVEManager by clicking below. You can use your server root credentials to access LVEManager." %}</p>
|
<p>{% trans "Imunify is now integrated via their new API. You can manage Imunify by clicking below. You can use your server root credentials to access Imunify." %}</p>
|
||||||
<br>
|
<br>
|
||||||
<a target="_blank" href="http://{{ ipAddress }}:9000">
|
<a target="_blank" href="http://{{ ipAddress }}:8090/imunify">
|
||||||
<button class="btn btn-primary">Access Now
|
<button class="btn btn-primary">Access Now
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
67
firewall/templates/firewall/notAvailable.html
Executable file
67
firewall/templates/firewall/notAvailable.html
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
{% extends "baseTemplate/index.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Not available - CyberPanel" %}{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{% load static %}
|
||||||
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div id="page-title">
|
||||||
|
<h2>{% trans "Not available" %}</h2>
|
||||||
|
<p>{% trans "Either Imunify is not installed or you are not on CloudLinux OS." %}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if not CL %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<p>{% trans "CloudLinux is not installed on your server." %} <a target="_blank"
|
||||||
|
href="https://go.cyberpanel.net/CLConvert">Click
|
||||||
|
Here</a> {% trans " for conversion details." %}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<div ng-controller="installCageFS" class="panel">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h3 class="title-hero">
|
||||||
|
{% trans "Activate Now" %} <img ng-hide="installDockerStatus"
|
||||||
|
src="{% static 'images/loading.gif' %}">
|
||||||
|
</h3>
|
||||||
|
<div class="example-box-wrapper">
|
||||||
|
|
||||||
|
<p>{% trans "CloudLinux is installed, but not activated." %}</p>
|
||||||
|
<!------ LSWS Switch box ----------------->
|
||||||
|
|
||||||
|
<div style="margin-top: 2%" ng-hide="installBoxGen" class="col-md-12">
|
||||||
|
|
||||||
|
<form action="/" id="" class="form-horizontal bordered-row">
|
||||||
|
<div class="form-group">
|
||||||
|
<div style="margin-top: 2%;" class="col-sm-12">
|
||||||
|
<textarea ng-model="requestData" rows="15"
|
||||||
|
class="form-control">{{ requestData }}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!----- LSWS Switch box ----------------->
|
||||||
|
<br>
|
||||||
|
<button ng-hide="dockerInstallBTN" class="btn btn-primary" ng-click="submitCageFSInstall()">Activate Now</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
@@ -597,6 +597,11 @@ class Upgrade:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
cursor.execute("ALTER TABLE websiteFunctions_websites MODIFY externalApp varchar(30)")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cursor.execute("ALTER TABLE loginSystem_acl ADD COLUMN listUsers INT DEFAULT 0;")
|
cursor.execute("ALTER TABLE loginSystem_acl ADD COLUMN listUsers INT DEFAULT 0;")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Websites(models.Model):
|
|||||||
phpSelection = models.CharField(max_length=10)
|
phpSelection = models.CharField(max_length=10)
|
||||||
ssl = models.IntegerField()
|
ssl = models.IntegerField()
|
||||||
state = models.IntegerField(default=1)
|
state = models.IntegerField(default=1)
|
||||||
externalApp = models.CharField(max_length=10, default=None)
|
externalApp = models.CharField(max_length=30, default=None)
|
||||||
|
|
||||||
class ChildDomains(models.Model):
|
class ChildDomains(models.Model):
|
||||||
master = models.ForeignKey(Websites,on_delete=models.CASCADE)
|
master = models.ForeignKey(Websites,on_delete=models.CASCADE)
|
||||||
|
|||||||
@@ -173,14 +173,13 @@ class WebsiteManager:
|
|||||||
|
|
||||||
loggedUser = Administrator.objects.get(pk=userID)
|
loggedUser = Administrator.objects.get(pk=userID)
|
||||||
newOwner = Administrator.objects.get(userName=websiteOwner)
|
newOwner = Administrator.objects.get(userName=websiteOwner)
|
||||||
|
|
||||||
if ACLManager.currentContextPermission(currentACL, 'createWebsite') == 0:
|
if ACLManager.currentContextPermission(currentACL, 'createWebsite') == 0:
|
||||||
return ACLManager.loadErrorJson('createWebSiteStatus', 0)
|
return ACLManager.loadErrorJson('createWebSiteStatus', 0)
|
||||||
|
|
||||||
if ACLManager.checkOwnerProtection(currentACL, loggedUser, newOwner) == 0:
|
if ACLManager.checkOwnerProtection(currentACL, loggedUser, newOwner) == 0:
|
||||||
return ACLManager.loadErrorJson('createWebSiteStatus', 0)
|
return ACLManager.loadErrorJson('createWebSiteStatus', 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if not validators.domain(domain):
|
if not validators.domain(domain):
|
||||||
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."}
|
data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."}
|
||||||
json_data = json.dumps(data_ret)
|
json_data = json.dumps(data_ret)
|
||||||
@@ -223,6 +222,7 @@ class WebsiteManager:
|
|||||||
|
|
||||||
import pwd
|
import pwd
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
pwd.getpwnam(externalApp)
|
pwd.getpwnam(externalApp)
|
||||||
@@ -233,7 +233,7 @@ class WebsiteManager:
|
|||||||
|
|
||||||
## Create Configurations
|
## Create Configurations
|
||||||
|
|
||||||
execPath = "sudo /usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py"
|
||||||
execPath = execPath + " createVirtualHost --virtualHostName " + domain + \
|
execPath = execPath + " createVirtualHost --virtualHostName " + domain + \
|
||||||
" --administratorEmail " + adminEmail + " --phpVersion '" + phpSelection + \
|
" --administratorEmail " + adminEmail + " --phpVersion '" + phpSelection + \
|
||||||
"' --virtualHostUser " + externalApp + " --ssl " + str(data['ssl']) + " --dkimCheck " \
|
"' --virtualHostUser " + externalApp + " --ssl " + str(data['ssl']) + " --dkimCheck " \
|
||||||
|
|||||||
Reference in New Issue
Block a user