diff --git a/cyberpanel.sh b/cyberpanel.sh index 3684eae76..48954b040 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -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)" diff --git a/install/install.py b/install/install.py index 2831bbaab..b58d33a65 100755 --- a/install/install.py +++ b/install/install.py @@ -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 diff --git a/mailServer/mailserverManager.py b/mailServer/mailserverManager.py index 17315f840..c4869661c 100755 --- a/mailServer/mailserverManager.py +++ b/mailServer/mailserverManager.py @@ -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: diff --git a/mailServer/models.py b/mailServer/models.py index b190bc617..e7f216071 100755 --- a/mailServer/models.py +++ b/mailServer/models.py @@ -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: diff --git a/mailServer/templates/mailServer/listEmails.html b/mailServer/templates/mailServer/listEmails.html index 5fe08e384..e3af18fe2 100755 --- a/mailServer/templates/mailServer/listEmails.html +++ b/mailServer/templates/mailServer/listEmails.html @@ -163,12 +163,14 @@ {% trans "Emails" %} + {% trans "Disk Usage" %} {% trans "Actions" %} + + + php81 + + + lsphp81-debuginfo + Debug information for package lsphp81 + 0 + + + + lsphp81-pecl-igbinary-debuginfo + Debug information for package lsphp81-pecl-igbinary + 0 + + + + lsphp81-pecl-mcrypt-debuginfo + lsphp81 lsphp81-pecl-mcrypt-debuginfo Extension + 0 + + + + lsphp81-bcmath + A extension for PHP applications for using the bcmath library. + 1 + + + + lsphp81-common + Common files for PHP. + 1 + + + + lsphp81-dba + A database abstraction layer extension for PHP applications. + 1 + + + + lsphp81-devel + Files needed for building PHP extensions. + 0 + + + + lsphp81-enchant + Enchant spelling extension for PHP applications. + 1 + + + + lsphp81-gd + A extension for PHP applications for using the gd graphics library. + 1 + + + + lsphp81-gmp + A extension for PHP applications for using the GNU MP library. + 1 + + + + lsphp81-imap + A extension for PHP applications that use IMAP. + 1 + + + + lsphp81-intl + Internationalization extension for PHP applications. + 1 + + + + lsphp81-json + lsphp81 Json PHP Extension + 1 + + + + lsphp81-ldap + A extension for PHP applications that use LDAP. + 1 + + + + lsphp81-mbstring + A extension for PHP applications which need multi-byte string handling. + 1 + + + + lsphp81-mysqlnd + A extension for PHP applications that use MySQL databases. + 1 + + + + lsphp81-odbc + A extension for PHP applications that use ODBC databases. + 1 + + + + lsphp81-opcache + The Zend OPcache. + 1 + + + + lsphp81-pdo + A database access abstraction extension for PHP applications. + 1 + + + + lsphp81-pear + PHP Extension and Application Repository framework. + 1 + + + + lsphp81-pecl-apcu + APC User Cache. + 0 + + + + lsphp81-pecl-apcu-devel + APCu developer files (header). + 0 + + + + lsphp81-pecl-apcu-panel + APCu control panel. + 0 + + + + lsphp81-pecl-igbinary + Replacement for the standard PHP serializer. + 0 + + + + lsphp81-pecl-igbinary-devel + Igbinary developer files (header). + 0 + + + + lsphp81-pecl-mcrypt + lsphp81 lsphp81-pecl-mcrypt Extension. + 0 + + + + lsphp81-pecl-memcache + Extension to work with the Memcached caching daemon. + 0 + + + + lsphp81-pecl-memcached + Extension to work with the Memcached caching daemon. + 0 + + + + lsphp81-pecl-msgpack + API for communicating with MessagePack serialization. + 0 + + + + lsphp81-pecl-msgpack-devel + MessagePack developer files (header). + 0 + + + + lsphp81-pecl-redis + Extension for communicating with the Redis key-value store. + 0 + + + + lsphp81-pgsql + A PostgreSQL database extension for PHP. + 1 + + + + lsphp81-process + extensions for PHP script using system process interfaces. + 1 + + + + lsphp81-pspell + A extension for PHP applications for using pspell interfaces. + 1 + + + + lsphp81-recode + A extension for PHP applications for using the recode library. + 1 + + + + lsphp81-snmp + A extension for PHP applications that query SNMP-managed devices. + 1 + + + + lsphp81-soap + A extension for PHP applications that use the SOAP protocol. + 1 + + + + lsphp81-tidy + Standard PHP extension provides tidy library support. + 1 + + + + lsphp81-xml + A module for PHP applications which use XML. + 1 + + + + lsphp81-xmlrpc + A extension for PHP applications which use the XML-RPC protocol. + 1 + + + + lsphp81-zip + ZIP archive management extension for PHP + 0 + + + + lsphp81-mcrypt + Standard PHP extension provides mcrypt library support. + 1 + + + + lsphp81-dbg + php73-dbg lsphp81-package + 0 + + + + lsphp81-ioncube + ioncube loaders + 0 + + + + lsphp81-pecl-imagick + Extension to create and modify images using ImageMagick + 0 + + + + lsphp81-sodium + The php-sodium extension provides strong encryption capabilities in an easy and consistent way. + 0 + + + diff --git a/managePHP/static/managePHP/managePHP.js b/managePHP/static/managePHP/managePHP.js index 429050521..519413c61 100755 --- a/managePHP/static/managePHP/managePHP.js +++ b/managePHP/static/managePHP/managePHP.js @@ -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, }; diff --git a/managePHP/templates/managePHP/editPHPConfig.html b/managePHP/templates/managePHP/editPHPConfig.html index bd3b0e97a..58eb8dc15 100755 --- a/managePHP/templates/managePHP/editPHPConfig.html +++ b/managePHP/templates/managePHP/editPHPConfig.html @@ -23,14 +23,14 @@