From b3726e7b53edf0f564b6455235a09592e45f303c Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Tue, 8 Aug 2023 15:26:29 +0500 Subject: [PATCH 1/7] bug fix: https://www.facebook.com/groups/cyberpanel/posts/3383581231953501/ --- cloudAPI/cloudManager.py | 9 +++++++++ mailServer/mailserverManager.py | 6 ++++++ plogical/dnsUtilities.py | 6 ++++++ plogical/mailUtilities.py | 3 +++ 4 files changed, 24 insertions(+) diff --git a/cloudAPI/cloudManager.py b/cloudAPI/cloudManager.py index ebb6b5f6b..f27ab4a28 100755 --- a/cloudAPI/cloudManager.py +++ b/cloudAPI/cloudManager.py @@ -2832,6 +2832,9 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + ## ipFile = "/etc/cyberpanel/machineIP" @@ -2852,6 +2855,9 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + for website in Websites.objects.all(): import tldextract extractDomain = tldextract.extract(website.domain) @@ -2897,6 +2903,9 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + from websiteFunctions.models import ChildDomains for website in ChildDomains.objects.all(): diff --git a/mailServer/mailserverManager.py b/mailServer/mailserverManager.py index 66249eb2a..de9662819 100755 --- a/mailServer/mailserverManager.py +++ b/mailServer/mailserverManager.py @@ -665,6 +665,9 @@ class MailServerManager(multi.Thread): command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + import tldextract extractDomain = tldextract.extract(domainName) @@ -730,6 +733,9 @@ class MailServerManager(multi.Thread): command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + import tldextract extractDomain = tldextract.extract(domainName) diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index ef8221a7e..8b21196c5 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -120,6 +120,9 @@ class DNS: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + import tldextract extractDomain = tldextract.extract(domain) @@ -527,6 +530,9 @@ class DNS: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + import tldextract extractDomain = tldextract.extract(domain) diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index 2954cfc09..592637aaf 100755 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -314,6 +314,9 @@ class mailUtilities: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' + ProcessUtilities.executioner(command) + import tldextract actualDomain = virtualHostName From db8903bcf587737d48d85398872f62e3c8034c89 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 10 Aug 2023 12:26:06 +0500 Subject: [PATCH 2/7] bug fix: upgrade mautic version and fix installation issues --- plogical/applicationInstaller.py | 13 ++++++++++-- plogical/phpUtilities.py | 20 ++++++++++++++++++- .../websiteFunctions/installMautic.html | 4 +++- websiteFunctions/website.py | 9 +++++++++ 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 408f47519..017f86757 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -31,7 +31,7 @@ class ApplicationInstaller(multi.Thread): LOCALHOST = 'localhost' REMOTE = 0 PORT = '3306' - MauticVersion = '4.4.0' + MauticVersion = '4.4.9' PrestaVersion = '1.7.8.3' def __init__(self, installApp, extraArgs): @@ -99,6 +99,15 @@ class ApplicationInstaller(multi.Thread): password = self.extraArgs['password'] email = self.extraArgs['email'] + + ### lets first find php path + + from plogical.phpUtilities import phpUtilities + + vhFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf' + + phpPath = phpUtilities.GetPHPVersionFromFile(vhFile) + FNULL = open(os.devnull, 'w') ## Open Status File @@ -242,7 +251,7 @@ $parameters = array( command = 'cp %s %s/app/config/local.php' % (localDB, finalPath) ProcessUtilities.executioner(command, externalApp) - command = "/usr/local/lsws/lsphp80/bin/php bin/console mautic:install http://%s -f" % (finalURL) + command = f"{phpPath} bin/console mautic:install http://%s -f" % (finalURL) result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath) if result.find('Install complete') == -1: diff --git a/plogical/phpUtilities.py b/plogical/phpUtilities.py index ff567bc56..c663e46e4 100755 --- a/plogical/phpUtilities.py +++ b/plogical/phpUtilities.py @@ -191,7 +191,6 @@ class phpUtilities: str(msg) + " [savePHPConfigAdvance]") print("0,"+str(msg)) - @staticmethod def GetStagingInJson(stagings): try: @@ -217,6 +216,25 @@ class phpUtilities: except BaseException as msg: return msg + @staticmethod + def GetPHPVersionFromFile(vhFile): + if ProcessUtilities.decideServer() == ProcessUtilities.OLS: + command = f'grep -Eo "/usr/local/lsws/lsphp[0-9]+/bin/lsphp" {vhFile}' + result = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n') + + result = result.rsplit("lsphp", 1)[0] + "php" + return result + + else: + command = f'grep -Eo -m 1 "php[0-9]+" {vhFile}' + result = ProcessUtilities.outputExecutioner(command, None, True).rstrip('\n') + result = f'/usr/local/lsws/ls{result}/bin/lsphp' + result = result.rsplit("lsphp", 1)[0] + "php" + return result + + + + def main(): diff --git a/websiteFunctions/templates/websiteFunctions/installMautic.html b/websiteFunctions/templates/websiteFunctions/installMautic.html index dbda62697..b3388b446 100755 --- a/websiteFunctions/templates/websiteFunctions/installMautic.html +++ b/websiteFunctions/templates/websiteFunctions/installMautic.html @@ -21,8 +21,10 @@
+ {% trans "Before installing Mautic, we will change the PHP version of the website to PHP 8.0, which is supported by Mautic." %} -
+ +
diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index d3eb0a9c7..69f197b45 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -4252,6 +4252,15 @@ StrictHostKeyChecking no else: return ACLManager.loadErrorJson('installStatus', 0) + + #### Before installing mautic change php to 8.0 + + completePathToConfigFile = f'/usr/local/lsws/conf/vhosts/{self.domain}/vhost.conf' + + execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py" + execPath = execPath + " changePHP --phpVersion 'PHP 8.0' --path " + completePathToConfigFile + ProcessUtilities.executioner(execPath) + mailUtilities.checkHome() extraArgs = {} From c5e7008f2f2bd04205c5be3c9d4dbb6b09ee9fa8 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 10 Aug 2023 14:52:21 +0500 Subject: [PATCH 3/7] install lsphp80 if not present for mautic --- plogical/applicationInstaller.py | 19 +++++++++++++++---- plogical/phpUtilities.py | 11 +++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 017f86757..5a68bfa42 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -99,6 +99,12 @@ class ApplicationInstaller(multi.Thread): password = self.extraArgs['password'] email = self.extraArgs['email'] + ## Open Status File + + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('Setting up paths,0') + statusFile.close() + ### lets first find php path @@ -108,13 +114,18 @@ class ApplicationInstaller(multi.Thread): phpPath = phpUtilities.GetPHPVersionFromFile(vhFile) + ### basically for now php 8.0 is being checked + + if not os.path.exists(phpPath): + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('PHP 8.0 missing installing now..,20') + statusFile.close() + phpUtilities.InstallSaidPHP('80') + + FNULL = open(os.devnull, 'w') - ## Open Status File - statusFile = open(tempStatusPath, 'w') - statusFile.writelines('Setting up paths,0') - statusFile.close() finalPath = '' self.permPath = '' diff --git a/plogical/phpUtilities.py b/plogical/phpUtilities.py index c663e46e4..4a0a130d7 100755 --- a/plogical/phpUtilities.py +++ b/plogical/phpUtilities.py @@ -232,6 +232,17 @@ class phpUtilities: result = result.rsplit("lsphp", 1)[0] + "php" return result + @staticmethod + def InstallSaidPHP(php): + if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu or ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20: + command = f'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp{php}*' + else: + command = f'dnf install lsphp{php}* --exclude lsphp73-pecl-zip --exclude *imagick* -y --skip-broken' + + + ProcessUtilities.executioner(command, None, True) + + From 92c7e88a17581c73da30abb7cb715805b8032ca9 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 10 Aug 2023 19:39:18 +0500 Subject: [PATCH 4/7] update static file cache --- .../templates/baseTemplate/index.html | 2 +- plogical/applicationInstaller.py | 30 +++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 6d062bd32..bf51910ee 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -77,7 +77,7 @@ - {% with version="2.3.4.3" %} + {% with version="2.3.4.5" %} diff --git a/plogical/applicationInstaller.py b/plogical/applicationInstaller.py index 5a68bfa42..6a2dcb626 100755 --- a/plogical/applicationInstaller.py +++ b/plogical/applicationInstaller.py @@ -548,6 +548,32 @@ $parameters = array( statusFile.writelines('Setting up paths,0') statusFile.close() + #### Before installing wordpress change php to 8.0 + + from plogical.virtualHostUtilities import virtualHostUtilities + + completePathToConfigFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf' + + execPath = "/usr/local/CyberCP/bin/python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py" + execPath = execPath + " changePHP --phpVersion 'PHP 8.0' --path " + completePathToConfigFile + ProcessUtilities.executioner(execPath) + + ### lets first find php path + + from plogical.phpUtilities import phpUtilities + + vhFile = f'/usr/local/lsws/conf/vhosts/{domainName}/vhost.conf' + + phpPath = phpUtilities.GetPHPVersionFromFile(vhFile) + + ### basically for now php 8.0 is being checked + + if not os.path.exists(phpPath): + statusFile = open(tempStatusPath, 'w') + statusFile.writelines('PHP 8.0 missing installing now..,20') + statusFile.close() + phpUtilities.InstallSaidPHP('80') + finalPath = '' self.permPath = '' @@ -604,8 +630,8 @@ $parameters = array( dbName, dbUser, dbPassword = self.dbCreation(tempStatusPath, website) self.permPath = '/home/%s/public_html' % (website.domain) - php = PHPManager.getPHPString(website.phpSelection) - FinalPHPPath = '/usr/local/lsws/lsphp%s/bin/php' % (php) + #php = PHPManager.getPHPString(website.phpSelection) + FinalPHPPath = phpPath ## Security Check From b7f31fd0b91c83324ff86b8c87cbfd8e03c5a084 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Mon, 14 Aug 2023 10:30:57 +0500 Subject: [PATCH 5/7] bug fix: https://github.com/usmannasir/cyberpanel/issues/1111 --- websiteFunctions/templates/websiteFunctions/website.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websiteFunctions/templates/websiteFunctions/website.html b/websiteFunctions/templates/websiteFunctions/website.html index 5e06f00e1..9a9c6e966 100755 --- a/websiteFunctions/templates/websiteFunctions/website.html +++ b/websiteFunctions/templates/websiteFunctions/website.html @@ -554,7 +554,7 @@
-
F +
From dd8ef0598f6c21ea0aa38fa84bd5bef1315e9819 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Mon, 14 Aug 2023 15:01:55 +0500 Subject: [PATCH 6/7] bug fix: tldextract permissions --- cloudAPI/cloudManager.py | 12 ++++++------ mailServer/mailserverManager.py | 8 ++++---- plogical/dnsUtilities.py | 8 ++++---- plogical/mailUtilities.py | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cloudAPI/cloudManager.py b/cloudAPI/cloudManager.py index f27ab4a28..a62696ac1 100755 --- a/cloudAPI/cloudManager.py +++ b/cloudAPI/cloudManager.py @@ -2832,8 +2832,8 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) ## @@ -2855,8 +2855,8 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) for website in Websites.objects.all(): import tldextract @@ -2903,8 +2903,8 @@ class CloudManager: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) from websiteFunctions.models import ChildDomains for website in ChildDomains.objects.all(): diff --git a/mailServer/mailserverManager.py b/mailServer/mailserverManager.py index de9662819..d4c852494 100755 --- a/mailServer/mailserverManager.py +++ b/mailServer/mailserverManager.py @@ -665,8 +665,8 @@ class MailServerManager(multi.Thread): command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) import tldextract @@ -733,8 +733,8 @@ class MailServerManager(multi.Thread): command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) import tldextract diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index 8b21196c5..b0242c855 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -120,8 +120,8 @@ class DNS: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) import tldextract @@ -530,8 +530,8 @@ class DNS: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) import tldextract diff --git a/plogical/mailUtilities.py b/plogical/mailUtilities.py index 592637aaf..b4a69ce0d 100755 --- a/plogical/mailUtilities.py +++ b/plogical/mailUtilities.py @@ -314,8 +314,8 @@ class mailUtilities: command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' ProcessUtilities.executioner(command) - command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/62bf135d1c2f3d4db4228b9ecaf507a2.tldextract.json.lock' - ProcessUtilities.executioner(command) + command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' + ProcessUtilities.executioner(command, None, True) import tldextract From d65b6b5bcd4e89ce1a0eeb74131f98093e85bb3a Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 21 Aug 2023 11:57:45 +0500 Subject: [PATCH 7/7] bug fix: mail function shift --- install/install.py | 2 +- plogical/IncScheduler.py | 5 ----- plogical/renew.py | 5 +++++ plogical/upgrade.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install/install.py b/install/install.py index 1ab1b78ef..8fe180987 100755 --- a/install/install.py +++ b/install/install.py @@ -1872,7 +1872,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout'; 0 * * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup >/dev/null 2>&1 0 0 1 * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup >/dev/null 2>&1 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/upgradeCritical.py >/dev/null 2>&1 -0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 +0 0 * * 4 /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 7 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null 0 0 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily 0 0 * * 0 /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Weekly diff --git a/plogical/IncScheduler.py b/plogical/IncScheduler.py index ac6c3cace..eff196b29 100644 --- a/plogical/IncScheduler.py +++ b/plogical/IncScheduler.py @@ -1389,11 +1389,6 @@ Automatic backup failed for %s on %s. print('%s. [SendToS3Cloud]' % (str(msg))) logging.writeToFile('%s. [SendToS3Cloud]' % (str(msg))) - @staticmethod - def FixMailSSL(): - for website in Websites.objects.all(): - virtualHostUtilities.setupAutoDiscover(1, '/home/cyberpanel/templogs', website.domain, website.admin) - @staticmethod def v2Backups(function): try: diff --git a/plogical/renew.py b/plogical/renew.py index 8f16c9d05..fd54a15e6 100644 --- a/plogical/renew.py +++ b/plogical/renew.py @@ -142,6 +142,11 @@ class Renew: except BaseException as msg: logging.writeToFile(str(msg) + '. Renew.SSLObtainer') + @staticmethod + def FixMailSSL(): + for website in Websites.objects.all(): + virtualHostUtilities.setupAutoDiscover(1, '/home/cyberpanel/templogs', website.domain, website.admin) + if __name__ == "__main__": sslOB = Renew() diff --git a/plogical/upgrade.py b/plogical/upgrade.py index ef969ca67..5cb08e55e 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -2794,7 +2794,7 @@ vmail 0 * * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup >/dev/null 2>&1 0 0 1 * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup >/dev/null 2>&1 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/upgradeCritical.py >/dev/null 2>&1 -0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 +0 0 * * 4 /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 7 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null */3 * * * * if ! find /home/*/public_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name '.htaccess' -exec false {} +; then /usr/local/lsws/bin/lswsctrl restart; fi """ @@ -2833,7 +2833,7 @@ vmail 0 * * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py hourlyCleanup >/dev/null 2>&1 0 0 1 * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/postfixSenderPolicy/client.py monthlyCleanup >/dev/null 2>&1 0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/upgradeCritical.py >/dev/null 2>&1 -0 2 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 +0 0 * * 4 /usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/renew.py >/dev/null 2>&1 7 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null 0 0 * * * /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Daily 0 0 * * 0 /usr/local/CyberCP/bin/python /usr/local/CyberCP/IncBackups/IncScheduler.py Weekly