bug fix: mail reset ubuntu 20

This commit is contained in:
Usman Nasir
2021-06-14 10:34:19 +05:00
parent 0703b9185b
commit ecd8ab967e

View File

@@ -1238,6 +1238,15 @@ class MailServerManagerUtils(multi.Thread):
command = "systemctl restart dovecot"
ProcessUtilities.executioner(command)
## For ubuntu 20
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20:
command = "sed -i 's|daemon_directory = /usr/libexec/postfix|daemon_directory = /usr/lib/postfix/sbin|g' /etc/postfix/main.cf"
ProcessUtilities.executioner(command)
except BaseException as msg:
logging.CyberCPLogFileWriter.statusWriter(self.extraArgs['tempStatusPath'],
'%s [setup_postfix_dovecot_config][404]' % (
@@ -1574,7 +1583,6 @@ milter_default_action = accept
return 1, 'All checks are OK.'
def main():
parser = argparse.ArgumentParser(description='CyberPanel Installer')