This commit is contained in:
usman@cyberpersons.com
2023-05-06 14:57:19 +05:00
parent 6eeaca15d3
commit a57a15b869
2 changed files with 86 additions and 6 deletions

View File

@@ -164,13 +164,20 @@ pattern_to_watch = ^/home/.+?/(public_html|public_ftp|private_html)(/.*)?$
## ##
command = 'pkill -f "bash i360deploy.sh"'
ServerStatusUtil.executioner(command, statusFile)
if not os.path.exists('i360deploy.sh'): if not os.path.exists('i360deploy.sh'):
command = 'wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh' command = 'wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh'
ServerStatusUtil.executioner(command, statusFile) ServerStatusUtil.executioner(command, statusFile)
command = 'bash i360deploy.sh --key %s --beta' % (key) command = 'bash i360deploy.sh --uninstall --yes'
ServerStatusUtil.executioner(command, statusFile) ServerStatusUtil.executioner(command, statusFile)
command = 'bash i360deploy.sh --key %s --yes' % (key)
ServerStatusUtil.executioner(command, statusFile)
logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath, logging.CyberCPLogFileWriter.statusWriter(ServerStatusUtil.lswsInstallStatusPath,
"Imunify reinstalled..\n", 1) "Imunify reinstalled..\n", 1)

View File

@@ -11,10 +11,10 @@
<div class="container"> <div class="container">
<div id="page-title"> <div id="page-title">
<h2>{% trans "Imunify" %} - <a target="_blank" <h2>{% trans "Imunify" %} - <a target="_blank"
href="https://go.cyberpanel.net/imunify" href="https://go.cyberpanel.net/imunify"
style="height: 23px;line-height: 21px;" style="height: 23px;line-height: 21px;"
class="btn btn-border btn-alt border-red btn-link font-red" class="btn btn-border btn-alt border-red btn-link font-red"
title=""><span>{% trans "Imunify Docs" %}</span></a></h2> title=""><span>{% trans "Imunify Docs" %}</span></a></h2>
<p>{% trans "Access Imunify" %}</p> <p>{% trans "Access Imunify" %}</p>
</div> </div>
@@ -25,7 +25,7 @@
</h3> </h3>
<div class="example-box-wrapper"> <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> <br>
<a target="_blank" href="/imunify"> <a target="_blank" href="/imunify">
<button class="btn btn-primary">Access Now <button class="btn btn-primary">Access Now
@@ -35,6 +35,79 @@
</div> </div>
</div> </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> </div>
{% endblock %} {% endblock %}