mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
Wasn't reading right!
This commit is contained in:
@@ -1395,14 +1395,14 @@ class preFlightsChecks:
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def centos_lib_dir_to_ubuntu(self, filename):
|
def centos_lib_dir_to_ubuntu(self, filename, old, new):
|
||||||
try:
|
try:
|
||||||
fd = open(filename, 'r')
|
fd = open(filename, 'r')
|
||||||
lines = fd.readlines()
|
lines = fd.readlines()
|
||||||
fd.close()
|
fd.close()
|
||||||
fd = open(filename, 'w')
|
fd = open(filename, 'w')
|
||||||
centos_prefix = '/usr/libexec/'
|
centos_prefix = old
|
||||||
ubuntu_prefix = '/usr/lib/'
|
ubuntu_prefix = new
|
||||||
for line in lines:
|
for line in lines:
|
||||||
index = line.find(centos_prefix)
|
index = line.find(centos_prefix)
|
||||||
if index != -1:
|
if index != -1:
|
||||||
@@ -1505,11 +1505,13 @@ class preFlightsChecks:
|
|||||||
if self.distro == ubuntu:
|
if self.distro == ubuntu:
|
||||||
preFlightsChecks.stdOut("Cleanup postfix/dovecot config files", 1)
|
preFlightsChecks.stdOut("Cleanup postfix/dovecot config files", 1)
|
||||||
if mysql == 'Two':
|
if mysql == 'Two':
|
||||||
self.centos_lib_dir_to_ubuntu("email-configs/master.cf")
|
self.centos_lib_dir_to_ubuntu("email-configs/master.cf", "/usr/libexec/", "/usr/lib/")
|
||||||
self.centos_lib_dir_to_ubuntu("email-configs/main.cf")
|
self.centos_lib_dir_to_ubuntu("email-configs/main.cf", "/usr/libexec/postfix",
|
||||||
|
"/usr/lib/postfix/sbin")
|
||||||
else:
|
else:
|
||||||
self.centos_lib_dir_to_ubuntu("email-configs-one/master.cf")
|
self.centos_lib_dir_to_ubuntu("email-configs-one/master.cf", "/usr/libexec/", "/usr/lib/")
|
||||||
self.centos_lib_dir_to_ubuntu("email-configs-one/main.cf")
|
self.centos_lib_dir_to_ubuntu("email-configs-one/main.cf", "/usr/libexec/postfix",
|
||||||
|
"/usr/lib/postfix/sbin")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user