mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-06-13 09:01:15 +02:00
Merge branch 'v2.3.2-dev' of https://github.com/usmannasir/cyberpanel into v2.3.2-dev
This commit is contained in:
@@ -1197,6 +1197,10 @@ if ! grep -q "pid_max" /etc/rc.local 2>/dev/null ; then
|
||||
systemctl mask systemd-resolved >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Backup previous resolv.conf file
|
||||
cp /etc/resolv.conf /etc/resolv.conf_bak
|
||||
|
||||
# Delete resolv.conf file
|
||||
rm -f /etc/resolv.conf
|
||||
|
||||
if [[ "$Server_Provider" = "Tencent Cloud" ]] ; then
|
||||
@@ -1214,6 +1218,21 @@ if ! grep -q "pid_max" /etc/rc.local 2>/dev/null ; then
|
||||
sleep 3
|
||||
#take a break ,or installer will break
|
||||
|
||||
# Check Connectivity
|
||||
if ping -q -c 1 -W 1 cyberpanel.sh >/dev/null; then
|
||||
echo -e "\nSuccessfully set up nameservers..\n"
|
||||
echo -e "\nThe network is up.. :)\n"
|
||||
echo -e "\nContinue installation..\n"
|
||||
else
|
||||
echo -e "\nThe network is down.. :(\n"
|
||||
rm -f /etc/resolv.conf
|
||||
mv /etc/resolv.conf_bak /etc/resolv.conf
|
||||
systemctl restart systemd-networkd >/dev/null 2>&1
|
||||
echo -e "\nReturns the nameservers settings to default..\n"
|
||||
echo -e "\nContinue installation..\n"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
cp /etc/resolv.conf /etc/resolv.conf-tmp
|
||||
|
||||
Line1="$(grep -n "f.write('nameserver 8.8.8.8')" installCyberPanel.py | head -n 1 | cut -d: -f1)"
|
||||
|
||||
@@ -547,7 +547,7 @@ password="%s"
|
||||
command = "chown -R root:root /usr/local/lscp"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "chmod 700 /usr/local/CyberCP/cli/cyberPanel.py"
|
||||
@@ -1282,9 +1282,10 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
|
||||
labsData = """[labs]
|
||||
imap_folder_list_limit = 0
|
||||
autocreate_system_folders = On
|
||||
"""
|
||||
|
||||
writeToFile = open(labsPath, 'w')
|
||||
writeToFile = open(labsPath, 'a')
|
||||
writeToFile.write(labsData)
|
||||
writeToFile.close()
|
||||
|
||||
@@ -1304,6 +1305,20 @@ imap_folder_list_limit = 0
|
||||
|
||||
writeToFile.close()
|
||||
|
||||
includeFileOldPath = '/usr/local/CyberCP/public/snappymail/_include.php'
|
||||
includeFileNewPath = '/usr/local/CyberCP/public/snappymail/include.php'
|
||||
|
||||
if os.path.exists(includeFileOldPath):
|
||||
writeToFile = open(includeFileOldPath, 'a')
|
||||
writeToFile.write("\ndefine('APP_DATA_FOLDER_PATH', '/usr/local/lscp/cyberpanel/rainloop/data/');\n")
|
||||
writeToFile.close()
|
||||
|
||||
command = 'mv %s %s' % (includeFileOldPath, includeFileNewPath)
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "sed -i 's|autocreate_system_folders = Off|autocreate_system_folders = On|g' %s" % (labsPath)
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
except BaseException as msg:
|
||||
logging.InstallLog.writeToFile('[ERROR] ' + str(msg) + " [downoad_and_install_snappymail]")
|
||||
return 0
|
||||
|
||||
@@ -183,7 +183,7 @@ class MailServerManager(multi.Thread):
|
||||
checker = 0
|
||||
count = 1
|
||||
for items in emails:
|
||||
dic = {'id': count, 'email': items.email}
|
||||
dic = {'id': count, 'email': items.email, 'DiskUsage': '%sMB' % items.DiskUsage}
|
||||
count = count + 1
|
||||
|
||||
if checker == 0:
|
||||
@@ -543,6 +543,7 @@ class MailServerManager(multi.Thread):
|
||||
|
||||
for items in records:
|
||||
dic = {'email': items.email,
|
||||
'DiskUsage': '%sMB' % items.DiskUsage
|
||||
}
|
||||
|
||||
if checker == 0:
|
||||
|
||||
@@ -24,6 +24,7 @@ class EUsers(models.Model):
|
||||
email = models.CharField(primary_key=True, max_length=80)
|
||||
password = models.CharField(max_length=200)
|
||||
mail = models.CharField(max_length=200, default='')
|
||||
DiskUsage = models.CharField(max_length=200)
|
||||
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -163,12 +163,14 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Emails" %}</th>
|
||||
<th>{% trans "Disk Usage" %}</th>
|
||||
<th>{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="record in records track by $index">
|
||||
<td ng-bind="record.email"></td>
|
||||
<td ng-bind="record.DiskUsage"></td>
|
||||
<td>
|
||||
<a data-toggle="modal" data-target="#settings"
|
||||
ng-click="changePasswordInitial(record.email)"
|
||||
|
||||
281
managePHP/php81.xml
Normal file
281
managePHP/php81.xml
Normal file
@@ -0,0 +1,281 @@
|
||||
<?xml version="1.0" ?>
|
||||
<php>
|
||||
<name>php81</name>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-debuginfo</extensionName>
|
||||
<extensionDescription>Debug information for package lsphp81</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-igbinary-debuginfo</extensionName>
|
||||
<extensionDescription>Debug information for package lsphp81-pecl-igbinary</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-mcrypt-debuginfo</extensionName>
|
||||
<extensionDescription>lsphp81 lsphp81-pecl-mcrypt-debuginfo Extension</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-bcmath</extensionName>
|
||||
<extensionDescription>A extension for PHP applications for using the bcmath library.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-common</extensionName>
|
||||
<extensionDescription>Common files for PHP.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-dba</extensionName>
|
||||
<extensionDescription>A database abstraction layer extension for PHP applications.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-devel</extensionName>
|
||||
<extensionDescription>Files needed for building PHP extensions.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-enchant</extensionName>
|
||||
<extensionDescription>Enchant spelling extension for PHP applications.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-gd</extensionName>
|
||||
<extensionDescription>A extension for PHP applications for using the gd graphics library.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-gmp</extensionName>
|
||||
<extensionDescription>A extension for PHP applications for using the GNU MP library.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-imap</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that use IMAP.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-intl</extensionName>
|
||||
<extensionDescription>Internationalization extension for PHP applications.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-json</extensionName>
|
||||
<extensionDescription>lsphp81 Json PHP Extension</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-ldap</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that use LDAP.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-mbstring</extensionName>
|
||||
<extensionDescription>A extension for PHP applications which need multi-byte string handling.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-mysqlnd</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that use MySQL databases.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-odbc</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that use ODBC databases.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-opcache</extensionName>
|
||||
<extensionDescription>The Zend OPcache.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pdo</extensionName>
|
||||
<extensionDescription>A database access abstraction extension for PHP applications.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pear</extensionName>
|
||||
<extensionDescription>PHP Extension and Application Repository framework.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-apcu</extensionName>
|
||||
<extensionDescription>APC User Cache.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-apcu-devel</extensionName>
|
||||
<extensionDescription>APCu developer files (header).</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-apcu-panel</extensionName>
|
||||
<extensionDescription>APCu control panel.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-igbinary</extensionName>
|
||||
<extensionDescription>Replacement for the standard PHP serializer.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-igbinary-devel</extensionName>
|
||||
<extensionDescription>Igbinary developer files (header).</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-mcrypt</extensionName>
|
||||
<extensionDescription>lsphp81 lsphp81-pecl-mcrypt Extension.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-memcache</extensionName>
|
||||
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-memcached</extensionName>
|
||||
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-msgpack</extensionName>
|
||||
<extensionDescription>API for communicating with MessagePack serialization.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-msgpack-devel</extensionName>
|
||||
<extensionDescription>MessagePack developer files (header).</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-redis</extensionName>
|
||||
<extensionDescription>Extension for communicating with the Redis key-value store.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pgsql</extensionName>
|
||||
<extensionDescription>A PostgreSQL database extension for PHP.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-process</extensionName>
|
||||
<extensionDescription>extensions for PHP script using system process interfaces.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pspell</extensionName>
|
||||
<extensionDescription>A extension for PHP applications for using pspell interfaces.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-recode</extensionName>
|
||||
<extensionDescription>A extension for PHP applications for using the recode library.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-snmp</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that query SNMP-managed devices.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-soap</extensionName>
|
||||
<extensionDescription>A extension for PHP applications that use the SOAP protocol.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-tidy</extensionName>
|
||||
<extensionDescription>Standard PHP extension provides tidy library support.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-xml</extensionName>
|
||||
<extensionDescription>A module for PHP applications which use XML.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-xmlrpc</extensionName>
|
||||
<extensionDescription>A extension for PHP applications which use the XML-RPC protocol.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-zip</extensionName>
|
||||
<extensionDescription>ZIP archive management extension for PHP</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-mcrypt</extensionName>
|
||||
<extensionDescription>Standard PHP extension provides mcrypt library support.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-dbg</extensionName>
|
||||
<extensionDescription>php73-dbg lsphp81-package</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-ioncube</extensionName>
|
||||
<extensionDescription>ioncube loaders</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pecl-imagick</extensionName>
|
||||
<extensionDescription>Extension to create and modify images using ImageMagick</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-sodium</extensionName>
|
||||
<extensionDescription>The php-sodium extension provides strong encryption capabilities in an easy and consistent way.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
</php>
|
||||
@@ -297,6 +297,11 @@ app.controller('editPHPConfig', function ($scope, $http, $timeout) {
|
||||
|
||||
|
||||
$scope.fetchPHPDetails = function () {
|
||||
var phpSelection = $scope.phpSelection;
|
||||
if (!phpSelection) {
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.loadingPHP = false;
|
||||
$scope.canNotFetch = true;
|
||||
$scope.detailsSaved = true;
|
||||
@@ -309,8 +314,6 @@ app.controller('editPHPConfig', function ($scope, $http, $timeout) {
|
||||
|
||||
url = "/managephp/getCurrentPHPConfig";
|
||||
|
||||
var phpSelection = $scope.phpSelection;
|
||||
|
||||
var data = {
|
||||
phpSelection: phpSelection,
|
||||
};
|
||||
@@ -440,14 +443,16 @@ app.controller('editPHPConfig', function ($scope, $http, $timeout) {
|
||||
};
|
||||
|
||||
$scope.fetchAdvancePHPDetails = function () {
|
||||
var phpSelection = $scope.phpSelection;
|
||||
if (!phpSelection) {
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.loadingPHP = false;
|
||||
$scope.savebtnAdvance = true;
|
||||
|
||||
|
||||
url = "/managephp/getCurrentAdvancedPHPConfig";
|
||||
|
||||
var phpSelection = $scope.phpSelection;
|
||||
|
||||
var data = {
|
||||
phpSelection: phpSelection,
|
||||
};
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
<div class="example-box-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
|
||||
<li class="col-md-2 nav-item tab-mod active">
|
||||
<li class="col-md-2 nav-item tab-mod active" ng-click="fetchPHPDetails()">
|
||||
<a href="#tab-example-1" data-toggle="tab" class="h4 nav-link">
|
||||
<i class="fa fa-cog btn-icon"></i>
|
||||
<span>{% trans "Basic" %}</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li class="col-md-2 tab-mod nav-item">
|
||||
<li class="col-md-2 tab-mod nav-item" ng-click="fetchAdvancePHPDetails()">
|
||||
<a href="#tab-example-3" data-toggle="tab" class="h4 nav-link">
|
||||
<i class="fa fa-cogs btn-icon"></i>
|
||||
<span>{% trans "Advanced" %}</span>
|
||||
|
||||
131
managePHP/ubuntuphp81.xml
Normal file
131
managePHP/ubuntuphp81.xml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" ?>
|
||||
<php>
|
||||
<name>php81</name>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-common</extensionName>
|
||||
<extensionDescription>Most of what you need.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-curl</extensionName>
|
||||
<extensionDescription>Curl (common web tools) required for PHP</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-dbg</extensionName>
|
||||
<extensionDescription>Debugging extension</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-dev</extensionName>
|
||||
<extensionDescription>Development features almost always required.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-imap</extensionName>
|
||||
<extensionDescription>Email extensions for PHP.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-intl</extensionName>
|
||||
<extensionDescription>Extensions for countries other than the U.S.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-json</extensionName>
|
||||
<extensionDescription>PHP extensions for JavaScript Object Notation.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-ldap</extensionName>
|
||||
<extensionDescription>PHP extensions for LDAP (directory access protocol)</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-modules-source</extensionName>
|
||||
<extensionDescription>PHP source modules for virtually everything. Very large.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-mysql</extensionName>
|
||||
<extensionDescription>PHP extension for MySQL or MariaDB databases.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-opcache</extensionName>
|
||||
<extensionDescription>PHP low-level caching of code. Very important for performance.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pgsql</extensionName>
|
||||
<extensionDescription>A PostgreSQL database extension for PHP.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-pspell</extensionName>
|
||||
<extensionDescription>PHP spell checking extensions.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-recode</extensionName>
|
||||
<extensionDescription>PHP extension to transform data between different character sets.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-snmp</extensionName>
|
||||
<extensionDescription>PHP network management extensions.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-sqlite3</extensionName>
|
||||
<extensionDescription>An extension for PHP applications that use the SQLite v3 features.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-sybase</extensionName>
|
||||
<extensionDescription>An extension for PHP applications that use Sybase databases.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-tidy</extensionName>
|
||||
<extensionDescription>PHP extensions for manipulating HTML, XHTML and XML documents.</extensionDescription>
|
||||
<status>1</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-ioncube</extensionName>
|
||||
<extensionDescription>ioncube loaders</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-imagick</extensionName>
|
||||
<extensionDescription>Extension to create and modify images using ImageMagick</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
<extension>
|
||||
<extensionName>lsphp81-sodium</extensionName>
|
||||
<extensionDescription>The php-sodium extension provides strong encryption capabilities in an easy and consistent way.</extensionDescription>
|
||||
<status>0</status>
|
||||
</extension>
|
||||
|
||||
</php>
|
||||
@@ -1237,7 +1237,36 @@ def installExtensions(request):
|
||||
phpExtension.save()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
newPHP81 = PHP(phpVers="php81")
|
||||
newPHP81.save()
|
||||
|
||||
php81Path = ''
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
||||
php81Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php81.xml')
|
||||
else:
|
||||
php81Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp81.xml')
|
||||
|
||||
php81 = ElementTree.parse(php81Path)
|
||||
|
||||
php81Extensions = php81.findall('extension')
|
||||
|
||||
for extension in php81Extensions:
|
||||
extensionName = extension.find('extensionName').text
|
||||
extensionDescription = extension.find('extensionDescription').text
|
||||
status = int(extension.find('status').text)
|
||||
|
||||
phpExtension = installedPackages(phpVers=newPHP81,
|
||||
extensionName=extensionName,
|
||||
description=extensionDescription,
|
||||
status=status)
|
||||
|
||||
phpExtension.save()
|
||||
except:
|
||||
pass
|
||||
|
||||
proc = httpProc(request, 'managePHP/installExtensions.html',
|
||||
{'phps': PHPManager.findPHPVersions()}, 'admin')
|
||||
return proc.render()
|
||||
|
||||
@@ -878,6 +878,16 @@ Automatic backup failed for %s on %s.
|
||||
except:
|
||||
config = {}
|
||||
|
||||
eDomains = website.domains_set.all()
|
||||
|
||||
for eDomain in eDomains:
|
||||
for email in eDomain.eusers_set.all():
|
||||
emailPath = '/home/vmail/%s/%s' % (website.domain, email.email.split('@')[0])
|
||||
email.DiskUsage = virtualHostUtilities.getDiskUsageofPath(emailPath)
|
||||
email.save()
|
||||
print('Disk Usage of %s is %s' % (email.email,email.DiskUsage))
|
||||
|
||||
|
||||
config['DiskUsage'], config['DiskUsagePercentage'] = virtualHostUtilities.getDiskUsage(
|
||||
"/home/" + website.domain, website.package.diskSpace)
|
||||
|
||||
|
||||
@@ -367,33 +367,33 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
try:
|
||||
#######
|
||||
|
||||
if os.path.exists("/usr/local/CyberCP/public/rainloop"):
|
||||
|
||||
if os.path.exists("/usr/local/lscp/cyberpanel/rainloop/data"):
|
||||
pass
|
||||
else:
|
||||
command = "mv /usr/local/CyberCP/public/rainloop/data /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
Upgrade.executioner(command, 0)
|
||||
|
||||
iPath = os.listdir('/usr/local/CyberCP/public/rainloop/rainloop/v/')
|
||||
|
||||
path = "/usr/local/CyberCP/public/snappymail/snappymail/v/%s/include.php" % (iPath[0])
|
||||
|
||||
data = open(path, 'r').readlines()
|
||||
writeToFile = open(path, 'w')
|
||||
|
||||
for items in data:
|
||||
if items.find("$sCustomDataPath = '';") > -1:
|
||||
writeToFile.writelines(
|
||||
" $sCustomDataPath = '/usr/local/lscp/cyberpanel/rainloop/data';\n")
|
||||
else:
|
||||
writeToFile.writelines(items)
|
||||
|
||||
writeToFile.close()
|
||||
return 0
|
||||
# if os.path.exists("/usr/local/CyberCP/public/rainloop"):
|
||||
#
|
||||
# if os.path.exists("/usr/local/lscp/cyberpanel/rainloop/data"):
|
||||
# pass
|
||||
# else:
|
||||
# command = "mv /usr/local/CyberCP/public/rainloop/data /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
# Upgrade.executioner(command, 0)
|
||||
#
|
||||
# command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
# Upgrade.executioner(command, 0)
|
||||
#
|
||||
# iPath = os.listdir('/usr/local/CyberCP/public/rainloop/rainloop/v/')
|
||||
#
|
||||
# path = "/usr/local/CyberCP/public/snappymail/snappymail/v/%s/include.php" % (iPath[0])
|
||||
#
|
||||
# data = open(path, 'r').readlines()
|
||||
# writeToFile = open(path, 'w')
|
||||
#
|
||||
# for items in data:
|
||||
# if items.find("$sCustomDataPath = '';") > -1:
|
||||
# writeToFile.writelines(
|
||||
# " $sCustomDataPath = '/usr/local/lscp/cyberpanel/rainloop/data';\n")
|
||||
# else:
|
||||
# writeToFile.writelines(items)
|
||||
#
|
||||
# writeToFile.close()
|
||||
# return 0
|
||||
|
||||
cwd = os.getcwd()
|
||||
|
||||
@@ -494,12 +494,27 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
|
||||
labsData = """[labs]
|
||||
imap_folder_list_limit = 0
|
||||
autocreate_system_folders = On
|
||||
"""
|
||||
|
||||
writeToFile = open(labsPath, 'w')
|
||||
writeToFile = open(labsPath, 'a')
|
||||
writeToFile.write(labsData)
|
||||
writeToFile.close()
|
||||
|
||||
includeFileOldPath = '/usr/local/CyberCP/public/snappymail/_include.php'
|
||||
includeFileNewPath = '/usr/local/CyberCP/public/snappymail/include.php'
|
||||
|
||||
if os.path.exists(includeFileOldPath):
|
||||
writeToFile = open(includeFileOldPath, 'a')
|
||||
writeToFile.write("\ndefine('APP_DATA_FOLDER_PATH', '/usr/local/lscp/cyberpanel/rainloop/data/');\n")
|
||||
writeToFile.close()
|
||||
|
||||
command = 'mv %s %s' % (includeFileOldPath, includeFileNewPath)
|
||||
Upgrade.executioner(command, 'mkdir snappymail configs', 0)
|
||||
|
||||
command = "sed -i 's|autocreate_system_folders = Off|autocreate_system_folders = On|g' %s" % (labsPath)
|
||||
Upgrade.executioner(command, 'mkdir snappymail configs', 0)
|
||||
|
||||
os.chdir(cwd)
|
||||
|
||||
except BaseException as msg:
|
||||
@@ -621,6 +636,7 @@ imap_folder_list_limit = 0
|
||||
'CREATE TABLE `loginSystem_acl` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `name` varchar(50) NOT NULL UNIQUE, `adminStatus` integer NOT NULL DEFAULT 0, `versionManagement` integer NOT NULL DEFAULT 0, `createNewUser` integer NOT NULL DEFAULT 0, `deleteUser` integer NOT NULL DEFAULT 0, `resellerCenter` integer NOT NULL DEFAULT 0, `changeUserACL` integer NOT NULL DEFAULT 0, `createWebsite` integer NOT NULL DEFAULT 0, `modifyWebsite` integer NOT NULL DEFAULT 0, `suspendWebsite` integer NOT NULL DEFAULT 0, `deleteWebsite` integer NOT NULL DEFAULT 0, `createPackage` integer NOT NULL DEFAULT 0, `deletePackage` integer NOT NULL DEFAULT 0, `modifyPackage` integer NOT NULL DEFAULT 0, `createDatabase` integer NOT NULL DEFAULT 0, `deleteDatabase` integer NOT NULL DEFAULT 0, `listDatabases` integer NOT NULL DEFAULT 0, `createNameServer` integer NOT NULL DEFAULT 0, `createDNSZone` integer NOT NULL DEFAULT 0, `deleteZone` integer NOT NULL DEFAULT 0, `addDeleteRecords` integer NOT NULL DEFAULT 0, `createEmail` integer NOT NULL DEFAULT 0, `deleteEmail` integer NOT NULL DEFAULT 0, `emailForwarding` integer NOT NULL DEFAULT 0, `changeEmailPassword` integer NOT NULL DEFAULT 0, `dkimManager` integer NOT NULL DEFAULT 0, `createFTPAccount` integer NOT NULL DEFAULT 0, `deleteFTPAccount` integer NOT NULL DEFAULT 0, `listFTPAccounts` integer NOT NULL DEFAULT 0, `createBackup` integer NOT NULL DEFAULT 0, `restoreBackup` integer NOT NULL DEFAULT 0, `addDeleteDestinations` integer NOT NULL DEFAULT 0, `scheduleBackups` integer NOT NULL DEFAULT 0, `remoteBackups` integer NOT NULL DEFAULT 0, `manageSSL` integer NOT NULL DEFAULT 0, `hostnameSSL` integer NOT NULL DEFAULT 0, `mailServerSSL` integer NOT NULL DEFAULT 0)')
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
cursor.execute('ALTER TABLE loginSystem_administrator ADD token varchar(500)')
|
||||
except:
|
||||
@@ -840,6 +856,11 @@ imap_folder_list_limit = 0
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
cursor.execute('ALTER TABLE e_users ADD DiskUsage varchar(200)')
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
connection.close()
|
||||
except:
|
||||
@@ -1977,7 +1998,7 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
||||
command = "chown -R root:root /usr/local/lscp"
|
||||
Upgrade.executioner(command, 'chown core code', 0)
|
||||
|
||||
command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data"
|
||||
command = "chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop"
|
||||
Upgrade.executioner(command, 'chown core code', 0)
|
||||
|
||||
command = "chmod 700 /usr/local/CyberCP/cli/cyberPanel.py"
|
||||
|
||||
@@ -749,7 +749,7 @@ class vhost:
|
||||
print("0,0")
|
||||
return 0,0
|
||||
|
||||
bwmeta = "/home/" + domainName + "/logs/bwmeta"
|
||||
bwmeta = "/home/cyberpanel/%s.bwmeta" % (domainName)
|
||||
|
||||
if not os.path.exists(path):
|
||||
print("0,0")
|
||||
|
||||
@@ -1195,6 +1195,14 @@ class virtualHostUtilities:
|
||||
except:
|
||||
return [int(0), int(0)]
|
||||
|
||||
@staticmethod
|
||||
def getDiskUsageofPath(path):
|
||||
|
||||
try:
|
||||
return subprocess.check_output('du -hs %s --block-size=1M' % (path), shell=True).decode("utf-8").split()[0]
|
||||
except BaseException:
|
||||
return '0MB'
|
||||
|
||||
@staticmethod
|
||||
def permissionControl(path):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user