diff --git a/CyberCP/settings.py b/CyberCP/settings.py index f3ae163cb..031ca5f63 100755 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -66,7 +66,7 @@ INSTALLED_APPS = [ 'containerization', 'CLManager', 'IncBackups', - 'WebTerminal' +# 'WebTerminal' ] MIDDLEWARE = [ diff --git a/CyberCP/urls.py b/CyberCP/urls.py index dde85b823..94902e562 100755 --- a/CyberCP/urls.py +++ b/CyberCP/urls.py @@ -44,5 +44,5 @@ urlpatterns = [ url(r'^container/', include('containerization.urls')), url(r'^CloudLinux/', include('CLManager.urls')), url(r'^IncrementalBackups/', include('IncBackups.urls')), - url(r'^Terminal/', include('WebTerminal.urls')), +# url(r'^Terminal/', include('WebTerminal.urls')), ] diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index 68207df78..dba899a75 100755 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -356,9 +356,10 @@ class mailUtilities: keyTable = "/etc/opendkim/KeyTable" configToWrite = "default._domainkey." + actualDomain + " " + actualDomain + ":default:/etc/opendkim/keys/" + virtualHostName + "/default.private\n" - writeToFile = open(keyTable, 'a') - writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.") - writeToFile.close() + if not os.path.exists(keyTable): + writeToFile = open(keyTable, 'a') + writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.\n") + writeToFile.close() data = open(keyTable, 'r').read() @@ -373,9 +374,10 @@ class mailUtilities: signingTable = "/etc/opendkim/SigningTable" configToWrite = "*@" + actualDomain + " default._domainkey." + actualDomain + "\n" - writeToFile = open(signingTable, 'a') - writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.") - writeToFile.close() + if not os.path.exists(signingTable): + writeToFile = open(signingTable, 'a') + writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.\n") + writeToFile.close() data = open(signingTable, 'r').read() @@ -390,9 +392,11 @@ class mailUtilities: trustedHosts = "/etc/opendkim/TrustedHosts" configToWrite = actualDomain + "\n" - writeToFile = open(trustedHosts, 'a') - writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.") - writeToFile.close() + if not os.path.exists(trustedHosts): + + writeToFile = open(trustedHosts, 'a') + writeToFile.write("##### CyberPanel Generated File - Do not edit if you don't know what you are doing.\n") + writeToFile.close() data = open(trustedHosts, 'r').read()