From 075a7ca82fd66e04609263e3a77f8d5b0325fdf0 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Thu, 26 Jan 2023 10:29:58 +0500 Subject: [PATCH] bug fix: https://github.com/usmannasir/cyberpanel/issues/1019, this should refresh mail ssl incase its expired/renewd --- plogical/IncScheduler.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plogical/IncScheduler.py b/plogical/IncScheduler.py index b423c0656..2866825a7 100644 --- a/plogical/IncScheduler.py +++ b/plogical/IncScheduler.py @@ -1359,6 +1359,11 @@ 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) + def main(): parser = argparse.ArgumentParser(description='CyberPanel Installer') @@ -1381,6 +1386,9 @@ def main(): IncScheduler.CalculateAndUpdateDiskUsage() IncScheduler.WPUpdates() + if args.function == 'Weekly': + IncScheduler.FixMailSSL() + ### Run incremental backups in sep thread ib = IncScheduler('startBackup', {'freq': args.function})