mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
combine changes from @spyngamerman into final package
This commit is contained in:
@@ -12,7 +12,7 @@ except:
|
|||||||
pass
|
pass
|
||||||
import threading as multi
|
import threading as multi
|
||||||
from plogical.processUtilities import ProcessUtilities
|
from plogical.processUtilities import ProcessUtilities
|
||||||
from models import IncJob, JobSnapshots
|
from IncBackups.models import IncJob, JobSnapshots
|
||||||
from websiteFunctions.models import Websites
|
from websiteFunctions.models import Websites
|
||||||
import plogical.randomPassword as randomPassword
|
import plogical.randomPassword as randomPassword
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||||
@@ -316,7 +316,7 @@ class IncJobs(multi.Thread):
|
|||||||
reparsed = minidom.parseString(rough_string)
|
reparsed = minidom.parseString(rough_string)
|
||||||
return reparsed.toprettyxml(indent=" ")
|
return reparsed.toprettyxml(indent=" ")
|
||||||
|
|
||||||
## /home/example.com/backup/backup-example.com-02.13.2018_10-24-52/meta.xml -- metaPath
|
## /home/example.com/backup/backup-example-06-50-03-Thu-Feb-2018/meta.xml -- metaPath
|
||||||
|
|
||||||
metaPath = '/home/cyberpanel/%s' % (str(randint(1000, 9999)))
|
metaPath = '/home/cyberpanel/%s' % (str(randint(1000, 9999)))
|
||||||
|
|
||||||
@@ -538,4 +538,4 @@ class IncJobs(multi.Thread):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
logging.statusWriter(self.statusPath, 'Completed', 1)
|
logging.statusWriter(self.statusPath, 'Completed', 1)
|
||||||
@@ -491,4 +491,4 @@ app.controller('incrementalDestinations', function ($scope, $http) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
136
IncBackups/templates/IncBackups/backupSchedule.html
Executable file
136
IncBackups/templates/IncBackups/backupSchedule.html
Executable file
@@ -0,0 +1,136 @@
|
|||||||
|
{% extends "baseTemplate/index.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% block title %}{% trans "Schedule Back up - 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 "Schedule Back up" %} - <a target="_blank" href="http://go.cyberpanel.net/remote-backup"
|
||||||
|
style="height: 23px;line-height: 21px;"
|
||||||
|
class="btn btn-border btn-alt border-red btn-link font-red"
|
||||||
|
title=""><span>{% trans "Remote Backups" %}</span></a></h2>
|
||||||
|
<p>{% trans "On this page you can schedule Back ups to localhost or remote server (If you have added one)." %}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-controller="scheduleBackup" class="panel">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h3 class="title-hero">
|
||||||
|
{% trans "Schedule Back up" %} <img ng-hide="scheduleBackupLoading"
|
||||||
|
src="{% static 'images/loading.gif' %}">
|
||||||
|
</h3>
|
||||||
|
<div class="example-box-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
<form action="/" class="form-horizontal bordered-row">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">{% trans "Select Destination" %}</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<select ng-change="scheduleFreqView()" ng-model="backupDest" class="form-control">
|
||||||
|
{% for items in destinations %}
|
||||||
|
<option>{{ items }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-hide="scheduleFreq" class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">{% trans "Select Frequency" %}</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<select ng-change="scheduleBtnView()" ng-model="backupFreq" class="form-control">
|
||||||
|
<option>Daily</option>
|
||||||
|
<option>Weekly</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-hide="localPath" class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">{% trans "Local Path" %}</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<input name="dom" type="text" class="form-control" ng-model="localPathValue"
|
||||||
|
placeholder="{% trans "Local directory where backups will be moved after creation." %}"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div ng-hide="scheduleBtn" class="form-group">
|
||||||
|
<label class="col-sm-3 control-label"></label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<button type="button" ng-click="addSchedule()"
|
||||||
|
class="btn btn-primary btn-lg btn-block">{% trans "Add Destination" %}</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!------ List of Destinations --------------->
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<label class="col-sm-3 control-label"></label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
|
||||||
|
<div ng-hide="canNotAddSchedule" class="alert alert-danger">
|
||||||
|
<p>{% trans "Cannot add schedule. Error message:" %} {$ errorMessage $} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-hide="scheduleAdded" class="alert alert-success">
|
||||||
|
<p>{% trans "Schedule Added" %}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||||
|
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<div class="col-sm-12">
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans "ID" %}</th>
|
||||||
|
<th>{% trans "Destination" %}</th>
|
||||||
|
<th>{% trans "Frequency" %}</th>
|
||||||
|
<th>{% trans "Delete" %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="record in records track by $index">
|
||||||
|
<td ng-bind="record.id"></td>
|
||||||
|
<td ng-bind="record.destLoc"></td>
|
||||||
|
<td ng-bind="record.frequency"></td>
|
||||||
|
<td ng-click="delSchedule(record.destLoc,record.frequency)"><img
|
||||||
|
src="{% static 'images/delete.png' %}"></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!------ List of records --------------->
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
0
IncBackups/templates/IncBackups/createBackup.html
Normal file → Executable file
0
IncBackups/templates/IncBackups/createBackup.html
Normal file → Executable file
@@ -13,4 +13,5 @@ urlpatterns = [
|
|||||||
url(r'^deleteBackup$', views.deleteBackup, name='deleteBackupInc'),
|
url(r'^deleteBackup$', views.deleteBackup, name='deleteBackupInc'),
|
||||||
url(r'^fetchRestorePoints$', views.fetchRestorePoints, name='fetchRestorePointsInc'),
|
url(r'^fetchRestorePoints$', views.fetchRestorePoints, name='fetchRestorePointsInc'),
|
||||||
url(r'^restorePoint$', views.restorePoint, name='restorePointInc'),
|
url(r'^restorePoint$', views.restorePoint, name='restorePointInc'),
|
||||||
|
url(r'^scheduleBackups$', views.scheduleBackups, name='scheduleBackupsInc'),
|
||||||
]
|
]
|
||||||
@@ -540,4 +540,29 @@ def restorePoint(request):
|
|||||||
logging.writeToFile(str(msg))
|
logging.writeToFile(str(msg))
|
||||||
final_dic = {'status': 0, 'metaStatus': 0, 'error_message': str(msg)}
|
final_dic = {'status': 0, 'metaStatus': 0, 'error_message': str(msg)}
|
||||||
final_json = json.dumps(final_dic)
|
final_json = json.dumps(final_dic)
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
|
|
||||||
|
def scheduleBackups(request):
|
||||||
|
try:
|
||||||
|
userID = request.session['userID']
|
||||||
|
currentACL = ACLManager.loadedACL(userID)
|
||||||
|
|
||||||
|
if ACLManager.currentContextPermission(currentACL, 'scheDuleBackups') == 0:
|
||||||
|
return ACLManager.loadError()
|
||||||
|
|
||||||
|
websitesName = ACLManager.findAllSites(currentACL, userID)
|
||||||
|
|
||||||
|
destinations = []
|
||||||
|
destinations.append('local')
|
||||||
|
|
||||||
|
path = '/home/cyberpanel/sftp'
|
||||||
|
|
||||||
|
for items in os.listdir(path):
|
||||||
|
destinations.append('sftp:%s' % (items))
|
||||||
|
|
||||||
|
for items in os.listdir(path):
|
||||||
|
destinations.append('s3:s3.amazonaws.com/%s' % (items))
|
||||||
|
|
||||||
|
return defRenderer(request, 'IncBackups/scheduleBackups.html', {'websiteList': websitesName, 'destinations': destinations})
|
||||||
|
except BaseException, msg:
|
||||||
|
return HttpResponse(str(msg))
|
||||||
@@ -24,7 +24,6 @@ Webhosting control panel that uses OpenLiteSpeed as web server.
|
|||||||
* PHP 7.0
|
* PHP 7.0
|
||||||
* PHP 7.1
|
* PHP 7.1
|
||||||
* PHP 7.2
|
* PHP 7.2
|
||||||
* PHP 7.3
|
|
||||||
|
|
||||||
# Installation Instructions
|
# Installation Instructions
|
||||||
|
|
||||||
|
|||||||
0
backup/backupManager.py
Normal file → Executable file
0
backup/backupManager.py
Normal file → Executable file
3
baseTemplate/templates/baseTemplate/index.html
Normal file → Executable file
3
baseTemplate/templates/baseTemplate/index.html
Normal file → Executable file
@@ -601,6 +601,9 @@
|
|||||||
<li class="restoreBackup"><a href="{% url 'backupDestinationsInc' %}"
|
<li class="restoreBackup"><a href="{% url 'backupDestinationsInc' %}"
|
||||||
title="{% trans 'Restore Back up' %}"><span>{% trans "Add Destinations" %}</span></a>
|
title="{% trans 'Restore Back up' %}"><span>{% trans "Add Destinations" %}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="restoreBackup"><a href="{% url 'scheduleBackupsInc' %}"
|
||||||
|
title="{% trans 'Schedule Back ups' %}"><span>{% trans "Schedule Back ups" %}</span></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div><!-- .sidebar-submenu -->
|
</div><!-- .sidebar-submenu -->
|
||||||
|
|||||||
0
cli/cliLogger.py
Normal file → Executable file
0
cli/cliLogger.py
Normal file → Executable file
0
emailPremium/templates/emailPremium/emailPage.html
Normal file → Executable file
0
emailPremium/templates/emailPremium/emailPage.html
Normal file → Executable file
2
emailPremium/templates/emailPremium/listDomains.html
Normal file → Executable file
2
emailPremium/templates/emailPremium/listDomains.html
Normal file → Executable file
@@ -106,4 +106,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
0
emailPremium/templates/emailPremium/policyServer.html
Normal file → Executable file
0
emailPremium/templates/emailPremium/policyServer.html
Normal file → Executable file
2
firewall/templates/firewall/index.html
Normal file → Executable file
2
firewall/templates/firewall/index.html
Normal file → Executable file
@@ -85,7 +85,7 @@
|
|||||||
<i class="fa fa-lock"></i>
|
<i class="fa fa-lock"></i>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
143
install/install.py
Normal file → Executable file
143
install/install.py
Normal file → Executable file
@@ -17,8 +17,8 @@ from os import urandom
|
|||||||
from random import choice
|
from random import choice
|
||||||
|
|
||||||
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz',
|
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz',
|
||||||
'nums': '0123456789',
|
'nums': '0123456789',
|
||||||
'big': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
'big': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ def generate_pass(length=14):
|
|||||||
password.append(a_char)
|
password.append(a_char)
|
||||||
return ''.join(password)
|
return ''.join(password)
|
||||||
|
|
||||||
|
|
||||||
def check_prev_char(password, current_char_set):
|
def check_prev_char(password, current_char_set):
|
||||||
"""Function to ensure that there are no consecutive
|
"""Function to ensure that there are no consecutive
|
||||||
UPPERCASE/lowercase/numbers/special-characters."""
|
UPPERCASE/lowercase/numbers/special-characters."""
|
||||||
@@ -59,6 +60,7 @@ def check_prev_char(password, current_char_set):
|
|||||||
centos = 0
|
centos = 0
|
||||||
ubuntu = 1
|
ubuntu = 1
|
||||||
|
|
||||||
|
|
||||||
def get_distro():
|
def get_distro():
|
||||||
distro = -1
|
distro = -1
|
||||||
distro_file = ""
|
distro_file = ""
|
||||||
@@ -175,7 +177,6 @@ class preFlightsChecks:
|
|||||||
'mountTemp',
|
'mountTemp',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
tmp = "/usr/.tempdisk /tmp ext4 loop,rw,noexec,nosuid,nodev,nofail 0 0\n"
|
tmp = "/usr/.tempdisk /tmp ext4 loop,rw,noexec,nosuid,nodev,nofail 0 0\n"
|
||||||
varTmp = "/tmp /var/tmp none bind 0 0\n"
|
varTmp = "/tmp /var/tmp none bind 0 0\n"
|
||||||
|
|
||||||
@@ -333,7 +334,6 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
command = "adduser docker"
|
command = "adduser docker"
|
||||||
|
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[setup_account_cyberpanel]',
|
preFlightsChecks.call(command, self.distro, '[setup_account_cyberpanel]',
|
||||||
'add user cyberpanel',
|
'add user cyberpanel',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
@@ -353,7 +353,6 @@ class preFlightsChecks:
|
|||||||
'add user cyberpanel',
|
'add user cyberpanel',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
command = "mkdir -p /etc/letsencrypt/live/"
|
command = "mkdir -p /etc/letsencrypt/live/"
|
||||||
@@ -943,8 +942,8 @@ class preFlightsChecks:
|
|||||||
if subprocess.check_output('systemd-detect-virt').find("openvz") > -1:
|
if subprocess.check_output('systemd-detect-virt').find("openvz") > -1:
|
||||||
command = "pip install --upgrade requests"
|
command = "pip install --upgrade requests"
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'Upgrade requests',
|
'Upgrade requests',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -953,18 +952,18 @@ class preFlightsChecks:
|
|||||||
os.chdir(self.path)
|
os.chdir(self.path)
|
||||||
|
|
||||||
command = "wget http://cyberpanel.sh/CyberPanel.1.9.0.tar.gz"
|
command = "wget http://cyberpanel.sh/CyberPanel.1.9.0.tar.gz"
|
||||||
#command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
|
# command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'CyberPanel Download',
|
'CyberPanel Download',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
command = "tar zxf CyberPanel.1.9.0.tar.gz"
|
command = "tar zxf CyberPanel.1.9.0.tar.gz"
|
||||||
#command = "tar zxf CyberPanelTemp.tar.gz"
|
# command = "tar zxf CyberPanelTemp.tar.gz"
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'Extract CyberPanel',1, 1, os.EX_OSERR)
|
'Extract CyberPanel', 1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
### update password:
|
### update password:
|
||||||
|
|
||||||
@@ -1016,8 +1015,6 @@ class preFlightsChecks:
|
|||||||
else:
|
else:
|
||||||
writeDataToFile.writelines(items)
|
writeDataToFile.writelines(items)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self.distro == ubuntu:
|
if self.distro == ubuntu:
|
||||||
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
os.fchmod(writeDataToFile.fileno(), stat.S_IRUSR | stat.S_IWUSR)
|
||||||
|
|
||||||
@@ -1029,20 +1026,18 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
### Applying migrations
|
### Applying migrations
|
||||||
|
|
||||||
|
|
||||||
os.chdir("CyberCP")
|
os.chdir("CyberCP")
|
||||||
|
|
||||||
command = "/usr/local/CyberCP/bin/python2 manage.py makemigrations"
|
command = "/usr/local/CyberCP/bin/python2 manage.py makemigrations"
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'CyberPanel Make Migrations',
|
'CyberPanel Make Migrations',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
command = "/usr/local/CyberCP/bin/python2 manage.py migrate"
|
command = "/usr/local/CyberCP/bin/python2 manage.py migrate"
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'CyberPanel Migrate',1, 1, os.EX_OSERR)
|
'CyberPanel Migrate', 1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
if not os.path.exists("/usr/local/CyberCP/public"):
|
if not os.path.exists("/usr/local/CyberCP/public"):
|
||||||
os.mkdir("/usr/local/CyberCP/public")
|
os.mkdir("/usr/local/CyberCP/public")
|
||||||
@@ -1050,7 +1045,7 @@ class preFlightsChecks:
|
|||||||
## Moving static content to lscpd location
|
## Moving static content to lscpd location
|
||||||
command = 'mv static /usr/local/CyberCP/public/'
|
command = 'mv static /usr/local/CyberCP/public/'
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
|
||||||
'Move static content', 1, 1, os.EX_OSERR)
|
'Move static content', 1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
path = "/usr/local/CyberCP/version.txt"
|
path = "/usr/local/CyberCP/version.txt"
|
||||||
@@ -1144,23 +1139,26 @@ class preFlightsChecks:
|
|||||||
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
files = ['/etc/yum.repos.d/MariaDB.repo', '/etc/pdns/pdns.conf', '/etc/systemd/system/lscpd.service',
|
files = ['/etc/yum.repos.d/MariaDB.repo', '/etc/pdns/pdns.conf', '/etc/systemd/system/lscpd.service',
|
||||||
'/etc/pure-ftpd/pure-ftpd.conf', '/etc/pure-ftpd/pureftpd-pgsql.conf', '/etc/pure-ftpd/pureftpd-mysql.conf', '/etc/pure-ftpd/pureftpd-ldap.conf',
|
'/etc/pure-ftpd/pure-ftpd.conf', '/etc/pure-ftpd/pureftpd-pgsql.conf',
|
||||||
'/etc/dovecot/dovecot.conf', '/usr/local/lsws/conf/httpd_config.xml', '/usr/local/lsws/conf/modsec.conf', '/usr/local/lsws/conf/httpd.conf']
|
'/etc/pure-ftpd/pureftpd-mysql.conf', '/etc/pure-ftpd/pureftpd-ldap.conf',
|
||||||
|
'/etc/dovecot/dovecot.conf', '/usr/local/lsws/conf/httpd_config.xml',
|
||||||
|
'/usr/local/lsws/conf/modsec.conf', '/usr/local/lsws/conf/httpd.conf']
|
||||||
|
|
||||||
for items in files:
|
for items in files:
|
||||||
command = 'chmod 644 %s' % (items)
|
command = 'chmod 644 %s' % (items)
|
||||||
preFlightsChecks.call(command, self.distro, '[fixCyberPanelPermissions]',
|
preFlightsChecks.call(command, self.distro, '[fixCyberPanelPermissions]',
|
||||||
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
impFile = ['/etc/pure-ftpd/pure-ftpd.conf', '/etc/pure-ftpd/pureftpd-pgsql.conf', '/etc/pure-ftpd/pureftpd-mysql.conf', '/etc/pure-ftpd/pureftpd-ldap.conf',
|
impFile = ['/etc/pure-ftpd/pure-ftpd.conf', '/etc/pure-ftpd/pureftpd-pgsql.conf',
|
||||||
'/etc/dovecot/dovecot.conf', '/etc/pdns/pdns.conf', '/etc/pure-ftpd/db/mysql.conf', '/etc/powerdns/pdns.conf']
|
'/etc/pure-ftpd/pureftpd-mysql.conf', '/etc/pure-ftpd/pureftpd-ldap.conf',
|
||||||
|
'/etc/dovecot/dovecot.conf', '/etc/pdns/pdns.conf', '/etc/pure-ftpd/db/mysql.conf',
|
||||||
|
'/etc/powerdns/pdns.conf']
|
||||||
|
|
||||||
for items in impFile:
|
for items in impFile:
|
||||||
command = 'chmod 600 %s' % (items)
|
command = 'chmod 600 %s' % (items)
|
||||||
preFlightsChecks.call(command, self.distro, '[fixCyberPanelPermissions]',
|
preFlightsChecks.call(command, self.distro, '[fixCyberPanelPermissions]',
|
||||||
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
'Change permissions for client.', 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
command = 'chmod 640 /etc/postfix/*.cf'
|
command = 'chmod 640 /etc/postfix/*.cf'
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, shell=True)
|
||||||
|
|
||||||
@@ -1200,7 +1198,7 @@ class preFlightsChecks:
|
|||||||
command = 'apt-get -y install unzip'
|
command = 'apt-get -y install unzip'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[install_unzip]',
|
preFlightsChecks.call(command, self.distro, '[install_unzip]',
|
||||||
'Install unzip', 1, 0, os.EX_OSERR)
|
'Install unzip', 1, 0, os.EX_OSERR)
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
logging.InstallLog.writeToFile(str(msg) + " [install_unzip]")
|
logging.InstallLog.writeToFile(str(msg) + " [install_unzip]")
|
||||||
|
|
||||||
@@ -1213,7 +1211,7 @@ class preFlightsChecks:
|
|||||||
command = 'apt-get -y install zip'
|
command = 'apt-get -y install zip'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[install_zip]',
|
preFlightsChecks.call(command, self.distro, '[install_zip]',
|
||||||
'Install zip', 1, 0, os.EX_OSERR)
|
'Install zip', 1, 0, os.EX_OSERR)
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
logging.InstallLog.writeToFile(str(msg) + " [install_zip]")
|
logging.InstallLog.writeToFile(str(msg) + " [install_zip]")
|
||||||
|
|
||||||
@@ -1227,7 +1225,7 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
command = 'composer create-project phpmyadmin/phpmyadmin'
|
command = 'composer create-project phpmyadmin/phpmyadmin'
|
||||||
preFlightsChecks.call(command, self.distro, '[download_install_phpmyadmin]',
|
preFlightsChecks.call(command, self.distro, '[download_install_phpmyadmin]',
|
||||||
'Download PHPMYAdmin', 1, 0, os.EX_OSERR)
|
'Download PHPMYAdmin', 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
## Write secret phrase
|
## Write secret phrase
|
||||||
|
|
||||||
@@ -1259,7 +1257,6 @@ class preFlightsChecks:
|
|||||||
|
|
||||||
###################################################### Email setup
|
###################################################### Email setup
|
||||||
|
|
||||||
|
|
||||||
def install_postfix_davecot(self):
|
def install_postfix_davecot(self):
|
||||||
self.stdOut("Install dovecot - first remove postfix")
|
self.stdOut("Install dovecot - first remove postfix")
|
||||||
|
|
||||||
@@ -1275,14 +1272,12 @@ enabled=1"""
|
|||||||
writeToFile.write(content)
|
writeToFile.write(content)
|
||||||
writeToFile.close()
|
writeToFile.close()
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if self.distro == centos:
|
if self.distro == centos:
|
||||||
|
|
||||||
command = 'yum -y install http://cyberpanel.sh/gf-release-latest.gf.el7.noarch.rpm'
|
command = 'yum -y install http://cyberpanel.sh/gf-release-latest.gf.el7.noarch.rpm'
|
||||||
subprocess.call(shlex.split(command))
|
subprocess.call(shlex.split(command))
|
||||||
|
|
||||||
|
|
||||||
command = 'yum remove postfix -y'
|
command = 'yum remove postfix -y'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y remove postfix'
|
command = 'apt-get -y remove postfix'
|
||||||
@@ -1372,7 +1367,6 @@ enabled=1"""
|
|||||||
preFlightsChecks.stdOut("Dovecot and Dovecot-MySQL successfully installed!")
|
preFlightsChecks.stdOut("Dovecot and Dovecot-MySQL successfully installed!")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
if self.distro != centos:
|
if self.distro != centos:
|
||||||
command = 'curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import'
|
command = 'curl https://repo.dovecot.org/DOVECOT-REPO-GPG | gpg --import'
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, shell=True)
|
||||||
@@ -1601,7 +1595,6 @@ enabled=1"""
|
|||||||
if os.path.exists(davecotmysql):
|
if os.path.exists(davecotmysql):
|
||||||
os.remove(davecotmysql)
|
os.remove(davecotmysql)
|
||||||
|
|
||||||
|
|
||||||
###############Getting SSL
|
###############Getting SSL
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
@@ -2104,7 +2097,6 @@ enabled=1"""
|
|||||||
break
|
break
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
while (1):
|
while (1):
|
||||||
@@ -2155,7 +2147,6 @@ enabled=1"""
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
while (1):
|
while (1):
|
||||||
@@ -2349,13 +2340,11 @@ enabled=1"""
|
|||||||
else:
|
else:
|
||||||
logging.InstallLog.writeToFile("Rainloop permissions changed!")
|
logging.InstallLog.writeToFile("Rainloop permissions changed!")
|
||||||
print(
|
print(
|
||||||
"[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] " + "Rainloop permissions changed!")
|
"[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] " + "Rainloop permissions changed!")
|
||||||
break
|
break
|
||||||
|
|
||||||
#############
|
#############
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
while (1):
|
while (1):
|
||||||
@@ -2383,7 +2372,6 @@ enabled=1"""
|
|||||||
'rainlooop data folder',
|
'rainlooop data folder',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
### Enable sub-folders
|
### Enable sub-folders
|
||||||
|
|
||||||
command = "mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/"
|
command = "mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/_data_/_default_/configs/"
|
||||||
@@ -2429,7 +2417,6 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
###################################################### Email setup ends!
|
###################################################### Email setup ends!
|
||||||
|
|
||||||
|
|
||||||
def reStartLiteSpeed(self):
|
def reStartLiteSpeed(self):
|
||||||
try:
|
try:
|
||||||
count = 0
|
count = 0
|
||||||
@@ -2491,7 +2478,6 @@ imap_folder_list_limit = 0
|
|||||||
'Install FirewallD',
|
'Install FirewallD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
######
|
######
|
||||||
if self.distro == centos:
|
if self.distro == centos:
|
||||||
# Not available in ubuntu
|
# Not available in ubuntu
|
||||||
@@ -2510,7 +2496,6 @@ imap_folder_list_limit = 0
|
|||||||
'Restart FirewallD',
|
'Restart FirewallD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
command = 'systemctl enable firewalld'
|
command = 'systemctl enable firewalld'
|
||||||
@@ -2518,8 +2503,6 @@ imap_folder_list_limit = 0
|
|||||||
'Install FirewallD',
|
'Install FirewallD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FirewallUtilities.addRule("tcp", "8090")
|
FirewallUtilities.addRule("tcp", "8090")
|
||||||
FirewallUtilities.addRule("tcp", "80")
|
FirewallUtilities.addRule("tcp", "80")
|
||||||
FirewallUtilities.addRule("tcp", "443")
|
FirewallUtilities.addRule("tcp", "443")
|
||||||
@@ -2550,7 +2533,6 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
## from here
|
## from here
|
||||||
|
|
||||||
|
|
||||||
def installLSCPD(self):
|
def installLSCPD(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
@@ -2564,8 +2546,8 @@ imap_folder_list_limit = 0
|
|||||||
command = 'yum -y install gcc gcc-c++ make autoconf glibc rcs'
|
command = 'yum -y install gcc gcc-c++ make autoconf glibc rcs'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == ubuntu:
|
if self.distro == ubuntu:
|
||||||
command = "apt-get -y install libpcre3 libpcre3-dev openssl libexpat1 libexpat1-dev libgeoip-dev" \
|
command = "apt-get -y install libpcre3 libpcre3-dev openssl libexpat1 libexpat1-dev libgeoip-dev" \
|
||||||
@@ -2575,24 +2557,22 @@ imap_folder_list_limit = 0
|
|||||||
' which curl'
|
' which curl'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
command = 'tar zxf lscp.tar.gz -C /usr/local/'
|
command = 'tar zxf lscp.tar.gz -C /usr/local/'
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
|
|
||||||
command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /usr/local/lscp/conf/key.pem -out /usr/local/lscp/conf/cert.pem'
|
command = 'openssl req -newkey rsa:1024 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /usr/local/lscp/conf/key.pem -out /usr/local/lscp/conf/cert.pem'
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 1, os.EX_OSERR)
|
1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.remove("/usr/local/lscp/fcgi-bin/lsphp")
|
os.remove("/usr/local/lscp/fcgi-bin/lsphp")
|
||||||
shutil.copy("/usr/local/lsws/lsphp70/bin/lsphp","/usr/local/lscp/fcgi-bin/lsphp")
|
shutil.copy("/usr/local/lsws/lsphp70/bin/lsphp", "/usr/local/lscp/fcgi-bin/lsphp")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -2602,25 +2582,25 @@ imap_folder_list_limit = 0
|
|||||||
command = 'useradd lscpd -M -d /usr/local/lscp'
|
command = 'useradd lscpd -M -d /usr/local/lscp'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos:
|
||||||
command = 'groupadd lscpd'
|
command = 'groupadd lscpd'
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
# Added group in useradd for Ubuntu
|
# Added group in useradd for Ubuntu
|
||||||
|
|
||||||
command = 'usermod -a -G lscpd lscpd'
|
command = 'usermod -a -G lscpd lscpd'
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
command = 'usermod -a -G lsadm lscpd'
|
command = 'usermod -a -G lsadm lscpd'
|
||||||
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
preFlightsChecks.call(command, self.distro, '[installLSCPD]',
|
||||||
'Install LSCPD',
|
'Install LSCPD',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
try:
|
try:
|
||||||
os.mkdir('/usr/local/lscp/cyberpanel')
|
os.mkdir('/usr/local/lscp/cyberpanel')
|
||||||
except:
|
except:
|
||||||
@@ -2630,7 +2610,7 @@ imap_folder_list_limit = 0
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#self.setupComodoRules()
|
# self.setupComodoRules()
|
||||||
self.setupPort()
|
self.setupPort()
|
||||||
self.setupPythonWSGI()
|
self.setupPythonWSGI()
|
||||||
|
|
||||||
@@ -2647,8 +2627,8 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
command = "mkdir -p /usr/local/lscp/modsec"
|
command = "mkdir -p /usr/local/lscp/modsec"
|
||||||
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
||||||
'setupComodoRules',
|
'setupComodoRules',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.path.exists('comodo.tar.gz'):
|
if os.path.exists('comodo.tar.gz'):
|
||||||
@@ -2658,13 +2638,13 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
command = "wget https://cyberpanel.net/modsec/comodo.tar.gz"
|
command = "wget https://cyberpanel.net/modsec/comodo.tar.gz"
|
||||||
result = preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
result = preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
||||||
'setupComodoRules',
|
'setupComodoRules',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
command = "tar -zxf comodo.tar.gz -C /usr/local/lscp/modsec"
|
command = "tar -zxf comodo.tar.gz -C /usr/local/lscp/modsec"
|
||||||
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
||||||
'setupComodoRules',
|
'setupComodoRules',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
@@ -2725,8 +2705,8 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
command = "chown -R lscpd:lscpd /usr/local/lscp/modsec"
|
command = "chown -R lscpd:lscpd /usr/local/lscp/modsec"
|
||||||
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
preFlightsChecks.call(command, self.distro, '[setupComodoRules]',
|
||||||
'setupComodoRules',
|
'setupComodoRules',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -2834,7 +2814,6 @@ imap_folder_list_limit = 0
|
|||||||
writeToFile.write("abc\n")
|
writeToFile.write("abc\n")
|
||||||
writeToFile.close()
|
writeToFile.close()
|
||||||
|
|
||||||
|
|
||||||
command = "chmod 600 " + path
|
command = "chmod 600 " + path
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
res = subprocess.call(cmd)
|
res = subprocess.call(cmd)
|
||||||
@@ -3261,13 +3240,14 @@ imap_folder_list_limit = 0
|
|||||||
def installPYDNS(self):
|
def installPYDNS(self):
|
||||||
command = "pip install pydns"
|
command = "pip install pydns"
|
||||||
preFlightsChecks.call(command, self.distro, '[installPYDNS]',
|
preFlightsChecks.call(command, self.distro, '[installPYDNS]',
|
||||||
'Install PYDNS',
|
'Install PYDNS',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
def installDockerPY(self):
|
def installDockerPY(self):
|
||||||
command = "pip install docker"
|
command = "pip install docker"
|
||||||
preFlightsChecks.call(command, self.distro, '[installDockerPY]',
|
preFlightsChecks.call(command, self.distro, '[installDockerPY]',
|
||||||
'Install DockerPY',
|
'Install DockerPY',
|
||||||
1, 0, os.EX_OSERR)
|
1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
def installOpenDKIM(self):
|
def installOpenDKIM(self):
|
||||||
try:
|
try:
|
||||||
@@ -3530,7 +3510,6 @@ milter_default_action = accept
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
while (1):
|
while (1):
|
||||||
command = "pip install virtualenv"
|
command = "pip install virtualenv"
|
||||||
@@ -3795,13 +3774,12 @@ def main():
|
|||||||
checks.setup_gunicorn()
|
checks.setup_gunicorn()
|
||||||
|
|
||||||
import installCyberPanel
|
import installCyberPanel
|
||||||
|
|
||||||
if ent == 0:
|
if ent == 0:
|
||||||
installCyberPanel.Main(cwd, mysql, distro, ent, None, port, args.ftp, args.powerdns)
|
installCyberPanel.Main(cwd, mysql, distro, ent, None, port, args.ftp, args.powerdns)
|
||||||
else:
|
else:
|
||||||
installCyberPanel.Main(cwd, mysql, distro, ent, serial, port, args.ftp, args.powerdns)
|
installCyberPanel.Main(cwd, mysql, distro, ent, serial, port, args.ftp, args.powerdns)
|
||||||
|
|
||||||
|
|
||||||
checks.setupPHPAndComposer()
|
checks.setupPHPAndComposer()
|
||||||
checks.fix_selinux_issue()
|
checks.fix_selinux_issue()
|
||||||
checks.install_psmisc()
|
checks.install_psmisc()
|
||||||
@@ -3822,7 +3800,6 @@ def main():
|
|||||||
|
|
||||||
checks.installFirewalld()
|
checks.installFirewalld()
|
||||||
|
|
||||||
|
|
||||||
checks.install_python_requests()
|
checks.install_python_requests()
|
||||||
checks.install_default_keys()
|
checks.install_default_keys()
|
||||||
|
|
||||||
@@ -3853,7 +3830,6 @@ def main():
|
|||||||
checks.setupLSCPDDaemon()
|
checks.setupLSCPDDaemon()
|
||||||
checks.fixCyberPanelPermissions()
|
checks.fixCyberPanelPermissions()
|
||||||
|
|
||||||
|
|
||||||
if args.postfix != None:
|
if args.postfix != None:
|
||||||
checks.enableDisableEmail(args.postfix)
|
checks.enableDisableEmail(args.postfix)
|
||||||
else:
|
else:
|
||||||
@@ -3872,7 +3848,6 @@ def main():
|
|||||||
preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.")
|
preFlightsChecks.stdOut("Pure-FTPD will be installed and enabled.")
|
||||||
checks.enableDisableFTP('On', distro)
|
checks.enableDisableFTP('On', distro)
|
||||||
|
|
||||||
|
|
||||||
checks.setUpFirstAccount()
|
checks.setUpFirstAccount()
|
||||||
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
|
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")
|
||||||
checks.installation_successfull()
|
checks.installation_successfull()
|
||||||
|
|||||||
0
install/installLog.py
Normal file → Executable file
0
install/installLog.py
Normal file → Executable file
@@ -3692,7 +3692,7 @@ msgstr "SpamAssassin конфигурация е успешно променен
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Email лимити документация"
|
msgstr "Email лимити документация"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3835,7 +3835,7 @@ msgstr " uspješno je kreiran."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Email logovi"
|
msgstr "Email logovi"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3773,7 +3773,7 @@ msgstr " 已成功创建."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Email日志"
|
msgstr "Email日志"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3780,7 +3780,7 @@ msgstr ""
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3706,7 +3706,7 @@ msgstr "Les configurations de SpamAssassin ont été enregistrées avec succès.
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Limites de messagerie documentations"
|
msgstr "Limites de messagerie documentations"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3848,7 +3848,7 @@ msgstr "δημιουργήθηκε με επιτυχία."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Αρχεία καταγραφής Email "
|
msgstr "Αρχεία καταγραφής Email "
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3437,7 +3437,7 @@ msgstr ""
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3803,7 +3803,7 @@ msgstr "Le configurazioni di SpamAssassin sono state salvate correttamente."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Documentazione Limiti Email"
|
msgstr "Documentazione Limiti Email"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3682,7 +3682,7 @@ msgstr "SpamAssassin 設定が保存されました。"
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Eメールの制限ドキュメント"
|
msgstr "Eメールの制限ドキュメント"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3676,7 +3676,7 @@ msgstr "Pomyślnie zapisano konfigurację SpamAssassin."
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Limity poczty dokumentacja"
|
msgstr "Limity poczty dokumentacja"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3845,7 +3845,7 @@ msgstr " foi criado com sucesso."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Logs de E-Mail"
|
msgstr "Logs de E-Mail"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3801,7 +3801,7 @@ msgstr "Успешно запущен процесс резервного коп
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Лог-журнал Эл.почты"
|
msgstr "Лог-журнал Эл.почты"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3775,7 +3775,7 @@ msgstr "Yedekleme işlemi başarıyla başlatıldı."
|
|||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#| msgid "Email Logs"
|
#| msgid "Email Logs"
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Eposta günlükleri"
|
msgstr "Eposta günlükleri"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
@@ -3674,7 +3674,7 @@ msgstr "Đã lưu thành công cấu hình SpamAssassin."
|
|||||||
#: emailPremium/templates/emailPremium/emailPage.html:13
|
#: emailPremium/templates/emailPremium/emailPage.html:13
|
||||||
#: emailPremium/templates/emailPremium/listDomains.html:14
|
#: emailPremium/templates/emailPremium/listDomains.html:14
|
||||||
#: emailPremium/templates/emailPremium/policyServer.html:13
|
#: emailPremium/templates/emailPremium/policyServer.html:13
|
||||||
msgid "Email Limits Docs"
|
msgid "Emai Limits Docs"
|
||||||
msgstr "Tài liệu giới hạn Emai"
|
msgstr "Tài liệu giới hạn Emai"
|
||||||
|
|
||||||
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
#: emailPremium/templates/emailPremium/emailLimits.html:14
|
||||||
|
|||||||
0
loginSystem/templates/loginSystem/login.html
Normal file → Executable file
0
loginSystem/templates/loginSystem/login.html
Normal file → Executable file
0
plogical/CyberCPLogFileWriter.py
Normal file → Executable file
0
plogical/CyberCPLogFileWriter.py
Normal file → Executable file
0
plogical/backupSchedule.py
Normal file → Executable file
0
plogical/backupSchedule.py
Normal file → Executable file
0
plogical/backupScheduleLocal.py
Normal file → Executable file
0
plogical/backupScheduleLocal.py
Normal file → Executable file
0
plogical/backupUtilities.py
Normal file → Executable file
0
plogical/backupUtilities.py
Normal file → Executable file
6
plogical/csf.py
Normal file → Executable file
6
plogical/csf.py
Normal file → Executable file
@@ -497,7 +497,7 @@ class CSF(multi.Thread):
|
|||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[blockIP]")
|
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[blockIP]")
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def run_command(command):
|
def run_command(command):
|
||||||
p = subprocess.Popen(command,
|
p = subprocess.Popen(command,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
@@ -507,8 +507,8 @@ class CSF(multi.Thread):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def checkIP(ipAddress):
|
def checkIP(ipAddress):
|
||||||
try:
|
try:
|
||||||
command = "sudo csf -g ' + ipAddress.split()
|
command = "sudo csf -g ' + ipAddress.split()"
|
||||||
for line in run_command(command):
|
for line in CSF.run_command(command):
|
||||||
print(line)
|
print(line)
|
||||||
|
|
||||||
except BaseException, msg:
|
except BaseException, msg:
|
||||||
|
|||||||
0
plogical/mailUtilities.py
Normal file → Executable file
0
plogical/mailUtilities.py
Normal file → Executable file
0
plogical/mysqlUtilities.py
Normal file → Executable file
0
plogical/mysqlUtilities.py
Normal file → Executable file
0
plogical/processUtilities.py
Normal file → Executable file
0
plogical/processUtilities.py
Normal file → Executable file
0
plogical/remoteBackup.py
Normal file → Executable file
0
plogical/remoteBackup.py
Normal file → Executable file
0
plogical/remoteTransferUtilities.py
Normal file → Executable file
0
plogical/remoteTransferUtilities.py
Normal file → Executable file
0
plogical/upgrade.py
Normal file → Executable file
0
plogical/upgrade.py
Normal file → Executable file
0
pluginInstaller/pluginInstaller.py
Normal file → Executable file
0
pluginInstaller/pluginInstaller.py
Normal file → Executable file
0
postfixSenderPolicy/accept_traffic.py
Normal file → Executable file
0
postfixSenderPolicy/accept_traffic.py
Normal file → Executable file
0
s3Backups/s3Backups.py
Normal file → Executable file
0
s3Backups/s3Backups.py
Normal file → Executable file
Reference in New Issue
Block a user