mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-03-01 09:50:44 +01:00
force passive ip on ubuntu
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user