diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 62cf9cb29..6e1943607 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -840,6 +840,9 @@
  • {% trans "CageFS" %}
  • +
  • {% trans "Imunify 360" %} +
  • diff --git a/firewall/firewallManager.py b/firewall/firewallManager.py index 9994fa9d5..1313a4a26 100755 --- a/firewall/firewallManager.py +++ b/firewall/firewallManager.py @@ -1305,7 +1305,7 @@ class FirewallManager: csfInstalled = 1 try: - command = 'sudo csf -h' + command = 'csf -h' output = ProcessUtilities.outputExecutioner(command) if output.find("command not found") > -1: csfInstalled = 0 @@ -1541,3 +1541,17 @@ class FirewallManager: final_dic = {'status': 0, 'error_message': str(msg)} final_json = json.dumps(final_dic) return HttpResponse(final_json) + + def imunify(self): + try: + userID = self.request.session['userID'] + currentACL = ACLManager.loadedACL(userID) + + if currentACL['admin'] == 1: + pass + else: + return ACLManager.loadError() + + return render(self.request, 'firewall/imunify.html', {}) + except BaseException as msg: + return HttpResponse(str(msg)) diff --git a/firewall/templates/firewall/imunify.html b/firewall/templates/firewall/imunify.html new file mode 100755 index 000000000..b1316daeb --- /dev/null +++ b/firewall/templates/firewall/imunify.html @@ -0,0 +1,37 @@ +{% extends "baseTemplate/index.html" %} +{% load i18n %} +{% block title %}{% trans "CloudLinux - CyberPanel" %}{% endblock %} +{% block content %} + + {% load static %} + {% get_current_language as LANGUAGE_CODE %} + + + +
    +
    +

    {% trans "CloudLinux" %}

    +

    {% trans "Access LVEManager" %}

    +
    + +
    +
    +

    + {% trans "CloudLinux" %} +

    +
    + +

    {% 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." %}

    +
    + + + + +
    +
    +
    + +
    +{% endblock %} + diff --git a/firewall/urls.py b/firewall/urls.py index bdbfec1d4..9fe46ff99 100755 --- a/firewall/urls.py +++ b/firewall/urls.py @@ -51,6 +51,11 @@ urlpatterns = [ url(r'^modifyPorts$', views.modifyPorts, name='modifyPorts'), url(r'^modifyIPs$', views.modifyIPs, name='modifyIPs'), + ## Imunify + + url(r'^imunify$', views.imunify, name='imunify'), + + ] \ No newline at end of file diff --git a/firewall/views.py b/firewall/views.py index 7c9e68cd4..af7b9ffb2 100755 --- a/firewall/views.py +++ b/firewall/views.py @@ -548,3 +548,15 @@ def modifyIPs(request): return coreResult except KeyError: return redirect(loadLoginPage) + +## Imunify + +def imunify(request): + try: + userID = request.session['userID'] + + fm = FirewallManager(request) + return fm.imunify() + + except KeyError: + return redirect(loadLoginPage)