bug fix: add check to see if backup process killed

This commit is contained in:
Usman Nasir
2019-12-13 22:18:53 +05:00
parent 52e7f038f1
commit 08cc518b1a
4 changed files with 76 additions and 16 deletions

View File

@@ -454,14 +454,14 @@ class InstallCyberPanel:
try:
f = open('/etc/resolv.conf', 'a')
f.write('nameserver 8.8.8.8')
f.close()
except IOError as e:
InstallCyberPanel.stdOut("[ERROR] Unable to create /etc/resolv.conf: " + str(e) +
". This may need to be fixed manually as 'echo \"nameserver 8.8.8.8\"> "
"/etc/resolv.conf'", 1, 1, os.EX_OSERR)
# try:
# f = open('/etc/resolv.conf', 'a')
# f.write('nameserver 8.8.8.8')
# f.close()
# except IOError as e:
# InstallCyberPanel.stdOut("[ERROR] Unable to create /etc/resolv.conf: " + str(e) +
# ". This may need to be fixed manually as 'echo \"nameserver 8.8.8.8\"> "
# "/etc/resolv.conf'", 1, 1, os.EX_OSERR)
if self.distro == centos:
command = 'yum -y install epel-release'