mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 17:56:12 +01:00
Use a different method for unattended installs
This commit is contained in:
@@ -1179,11 +1179,17 @@ class preFlightsChecks:
|
|||||||
if self.distro == centos:
|
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'
|
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:
|
else:
|
||||||
command = 'debconf-set-selections <<< "postfix postfix/mailname string ' + str(socket.getfqdn()) + '"'
|
command = 'apt-get -y debconf-utils'
|
||||||
subprocess.call(shlex.split(command), shell=True)
|
subprocess.call(shlex.split(command))
|
||||||
command = 'debconf-set-selections <<< "postfix postfix/main_mailer_type string \'Internet Site\'"'
|
file_name = self.cwd + '/pf.unattend.text'
|
||||||
subprocess.call(shlex.split(command), shell=True)
|
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'
|
command = 'apt-get -y install postfix'
|
||||||
|
# os.remove(file_name)
|
||||||
|
|
||||||
cmd = shlex.split(command)
|
cmd = shlex.split(command)
|
||||||
|
|
||||||
|
|||||||
@@ -970,7 +970,10 @@ class InstallCyberPanel:
|
|||||||
InstallCyberPanel.stdOut("Configuring PowerDNS..")
|
InstallCyberPanel.stdOut("Configuring PowerDNS..")
|
||||||
|
|
||||||
os.chdir(self.cwd)
|
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):
|
if os.path.exists(dnsPath):
|
||||||
os.remove(dnsPath)
|
os.remove(dnsPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user