Skip to content

Commit

Permalink
bug fix imunify360 issue: #1062
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed May 6, 2023
1 parent 6eeaca1 commit a57a15b
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CLManager/CageFS.py
Expand Up @@ -164,13 +164,20 @@ def submitinstallImunify(key):

##

command = 'pkill -f "bash i360deploy.sh"'
ServerStatusUtil.executioner(command, statusFile)

if not os.path.exists('i360deploy.sh'):
command = 'wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh'
ServerStatusUtil.executioner(command, statusFile)

command = 'bash i360deploy.sh --key %s --beta' % (key)
command = 'bash i360deploy.sh --uninstall --yes'
ServerStatusUtil.executioner(command, statusFile)

command = 'bash i360deploy.sh --key %s --yes' % (key)
ServerStatusUtil.executioner(command, statusFile)


logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
"Imunify reinstalled..\n", 1)

Expand Down
83 changes: 78 additions & 5 deletions firewall/templates/firewall/imunify.html
Expand Up @@ -11,10 +11,10 @@
<div class="container">
<div id="page-title">
<h2>{% trans "Imunify" %} - <a target="_blank"
href="https://go.cyberpanel.net/imunify"
style="height: 23px;line-height: 21px;"
class="btn btn-border btn-alt border-red btn-link font-red"
title=""><span>{% trans "Imunify Docs" %}</span></a></h2>
href="https://go.cyberpanel.net/imunify"
style="height: 23px;line-height: 21px;"
class="btn btn-border btn-alt border-red btn-link font-red"
title=""><span>{% trans "Imunify Docs" %}</span></a></h2>
<p>{% trans "Access Imunify" %}</p>
</div>

Expand All @@ -25,7 +25,7 @@ <h3 class="title-hero">
</h3>
<div class="example-box-wrapper">

<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>
<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. Login details for Imunify360 is your server root and its password." %}</p>
<br>
<a target="_blank" href="/imunify">
<button class="btn btn-primary">Access Now
Expand All @@ -35,6 +35,79 @@ <h3 class="title-hero">
</div>
</div>
</div>
<div ng-controller="installImunify" class="panel">
<div class="panel-body">
<h3 class="title-hero">
{% trans "Imunify360 Not working?" %} <img ng-hide="installDockerStatus"
src="{% static 'images/loading.gif' %}">
</h3>
<div class="example-box-wrapper">
<br>
<p>{% trans "If for some reason Imunify360 is not working, you can re-install it using the form below." %}</p>
<br>
<!------ LSWS Switch box ----------------->

<div class="alert alert-info">
<div class="bg-black alert-icon">
<i class="glyph-icon icon-comment"></i>
</div>
<div class="alert-content">
<h4 class="alert-title">We will run following commands again:</h4>
<br>
<p><code>wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh -O
i360deploy.sh</code></p>
<br>
<p><code>bash i360deploy.sh --key YOUR_KEY --yes</code></p>
<br>

<p>If you can still not access Imunify360 after re-installation, just run
the above commands on your server terminal, make sure to replace <code>YOUR_KEY</code>
with your
Imunify360 Key.</p>
</div>
</div>

<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>

<form action="/" id="" class="form-horizontal bordered-row">

<div ng-hide="dockerInstallBTN" class="form-group">
<label class="col-sm-3 control-label">{% trans "Imunify Key" %}</label>
<div class="col-sm-6">
<input name="key" type="text" class="form-control" ng-model="key" required>
</div>
</div>

<div ng-hide="dockerInstallBTN" ng-hide="installationDetailsForm" class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-6">
<button type="button" class="btn btn-primary"
ng-click="submitinstallImunify()">
Re-Install Now
</button>
</div>
</div>

</form>

</div>
</div>
</div>

</div>
{% endblock %}
Expand Down

0 comments on commit a57a15b

Please sign in to comment.