diff --git a/install/install.py b/install/install.py index f39d1ec29..cead16faa 100755 --- a/install/install.py +++ b/install/install.py @@ -2310,9 +2310,9 @@ def main(): import installCyberPanel if ent == 0: - installCyberPanel.Main(cwd, mysql, distro, ent, None, port, args.ftp, args.powerdns) + installCyberPanel.Main(cwd, mysql, distro, ent, None, port, args.ftp, args.powerdns, args.publicip) else: - installCyberPanel.Main(cwd, mysql, distro, ent, serial, port, args.ftp, args.powerdns) + installCyberPanel.Main(cwd, mysql, distro, ent, serial, port, args.ftp, args.powerdns, args.publicip) checks.setupPHPAndComposer() checks.fix_selinux_issue() diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 4f96f2a96..b1155054c 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -18,7 +18,7 @@ class InstallCyberPanel: mysql_Root_password = "" mysqlPassword = "" - def __init__(self, rootPath, cwd, distro, ent, serial = None, port = None, ftp = None, dns = None): + def __init__(self, rootPath, cwd, distro, ent, serial = None, port = None, ftp = None, dns = None, publicip = None): self.server_root_path = rootPath self.cwd = cwd self.distro = distro @@ -27,6 +27,7 @@ class InstallCyberPanel: self.port = port self.ftp = None self.dns = dns + self.publicip = publicip @staticmethod def stdOut(message, log=0, exit=0, code=os.EX_OK): @@ -439,6 +440,11 @@ class InstallCyberPanel: command = 'echo 1 > /etc/pure-ftpd/conf/TLS' subprocess.call(command, shell=True) + command = 'echo %s > /etc/pure-ftpd/conf/ForcePassiveIP' % (self.publicip) + subprocess.call(command, shell=True) + + + command = 'systemctl restart pure-ftpd-mysql.service' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)