mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
bug fix: dovecot
This commit is contained in:
@@ -69,3 +69,16 @@ plugin {
|
|||||||
zlib_save_level = 6
|
zlib_save_level = 6
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service stats {
|
||||||
|
unix_listener stats-reader {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
unix_listener stats-writer {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -70,3 +70,16 @@ plugin {
|
|||||||
zlib_save_level = 6
|
zlib_save_level = 6
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service stats {
|
||||||
|
unix_listener stats-reader {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
unix_listener stats-writer {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -192,7 +192,7 @@ class ProcessUtilities(multi.Thread):
|
|||||||
else:
|
else:
|
||||||
command = '%s-u %s %s' % (ProcessUtilities.token, user, command)
|
command = '%s-u %s %s' % (ProcessUtilities.token, user, command)
|
||||||
command = command.replace('sudo', '')
|
command = command.replace('sudo', '')
|
||||||
#logging.writeToFile(ProcessUtilities.token + command)
|
#logging.writeToFile(command)
|
||||||
sock.sendall(command.encode('utf-8'))
|
sock.sendall(command.encode('utf-8'))
|
||||||
|
|
||||||
data = ""
|
data = ""
|
||||||
|
|||||||
@@ -1923,6 +1923,32 @@ failovermethod=priority
|
|||||||
command = "systemctl restart dovecot"
|
command = "systemctl restart dovecot"
|
||||||
Upgrade.executioner(command, 0)
|
Upgrade.executioner(command, 0)
|
||||||
|
|
||||||
|
dovecotConf = '/etc/dovecot/dovecot.conf'
|
||||||
|
|
||||||
|
dovecotContent = open(dovecotConf, 'r').read()
|
||||||
|
|
||||||
|
if dovecotContent.find('service stats') == -1:
|
||||||
|
writeToFile = open(dovecotConf, 'a')
|
||||||
|
|
||||||
|
content = """\nservice stats {
|
||||||
|
unix_listener stats-reader {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
unix_listener stats-writer {
|
||||||
|
user = vmail
|
||||||
|
group = vmail
|
||||||
|
mode = 0660
|
||||||
|
}
|
||||||
|
}\n"""
|
||||||
|
|
||||||
|
writeToFile.write(content)
|
||||||
|
writeToFile.close()
|
||||||
|
|
||||||
|
command = 'systemctl restart dovecot'
|
||||||
|
Upgrade.executioner(command, command, 0)
|
||||||
|
|
||||||
Upgrade.stdOut("Dovecot upgraded.")
|
Upgrade.stdOut("Dovecot upgraded.")
|
||||||
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user