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" %}