mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-15 12:02:06 +01:00
bug fix: fix empty resolv.conf in al8 reset email config
This commit is contained in:
@@ -2537,7 +2537,11 @@ class MailServerManagerUtils(multi.Thread):
|
||||
|
||||
etcResolve = '/etc/resolv.conf'
|
||||
|
||||
dataEtcResolv = open(etcResolve, 'r').read()
|
||||
if os.path.exists(etcResolve):
|
||||
dataEtcResolv = open(etcResolve, 'r').read()
|
||||
else:
|
||||
dataEtcResolv = ''
|
||||
|
||||
|
||||
if len(dataEtcResolv) < 4:
|
||||
writeToFile = open(etcResolve, 'w')
|
||||
|
||||
Reference in New Issue
Block a user