From 3cb1049840e8278f98afb29ca7018145fb66edf7 Mon Sep 17 00:00:00 2001 From: rperper Date: Tue, 30 Oct 2018 17:33:43 -0400 Subject: [PATCH] Use a different method for unattended installs --- install/install.py | 14 ++++++++++---- install/installCyberPanel.py | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/install/install.py b/install/install.py index 0baef533a..98f1950c0 100755 --- a/install/install.py +++ b/install/install.py @@ -1179,11 +1179,17 @@ class preFlightsChecks: if self.distro == centos: command = 'yum install -y http://mirror.ghettoforge.org/distributions/gf/el/7/plus/x86_64//postfix3-3.2.4-1.gf.el7.x86_64.rpm' else: - command = 'debconf-set-selections <<< "postfix postfix/mailname string ' + str(socket.getfqdn()) + '"' - subprocess.call(shlex.split(command), shell=True) - command = 'debconf-set-selections <<< "postfix postfix/main_mailer_type string \'Internet Site\'"' - subprocess.call(shlex.split(command), shell=True) + command = 'apt-get -y debconf-utils' + subprocess.call(shlex.split(command)) + file_name = self.cwd + '/pf.unattend.text' + pf = open(file_name, 'w') + pf.write('postfix postfix/mailname string ' + str(socket.getfqdn() + '\n')) + pf.write('postfix postfix/main_mailer_type string "Internet Site"\n') + pf.close() + command = 'debconf-set-selections ' + file_name + subprocess.call(shlex.split(command)) command = 'apt-get -y install postfix' + # os.remove(file_name) cmd = shlex.split(command) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 105d27bf2..f44c8ac63 100644 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -970,7 +970,10 @@ class InstallCyberPanel: InstallCyberPanel.stdOut("Configuring PowerDNS..") os.chdir(self.cwd) - dnsPath = "/etc/pdns/pdns.conf" + if self.distro == centos: + dnsPath = "/etc/pdns/pdns.conf" + else: + dnsPath = "/etc/powerdns/pdns.conf" if os.path.exists(dnsPath): os.remove(dnsPath)