diff --git a/install/install.py b/install/install.py index cf6663b32..724897789 100755 --- a/install/install.py +++ b/install/install.py @@ -190,7 +190,7 @@ def mountTemp(self): @staticmethod def pureFTPDServiceName(distro): if distro == ubuntu: - return 'pure-ftpd' + return 'pure-ftpd-mysql' return 'pure-ftpd' @staticmethod diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index c8305cf6c..ee9cce381 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -348,11 +348,11 @@ def fixMariaDB(self): def installPureFTPD(self): if self.distro == ubuntu: - command = 'apt-get -y install ' + install.preFlightsChecks.pureFTPDServiceName(self.distro) + command = 'DEBIAN_FRONTEND=noninteractive apt install pure-ftpd-mysql -y' + os.system(command) else: command = "yum install -y pure-ftpd" - - install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) + install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) ####### Install pureftpd to system startup @@ -428,8 +428,6 @@ def installPureFTPDConfigurations(self, mysql): writeDataToFile.close() if self.distro == ubuntu: - command = 'apt install pure-ftpd-mysql libmariadb3 -y' - install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) if os.path.exists('/etc/pure-ftpd/db/mysql.conf'): os.remove('/etc/pure-ftpd/db/mysql.conf') @@ -446,16 +444,16 @@ def installPureFTPDConfigurations(self, mysql): command = 'echo "40110 40210" > /etc/pure-ftpd/conf/PassivePortRange' subprocess.call(command, shell=True) - command = 'wget https://ubuntu.cyberpanel.net/pool/main/p/pure-ftpd/pure-ftpd-common_1.0.47-3_all.deb' - install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) + command = 'echo "no" > /etc/pure-ftpd/conf/UnixAuthentication' + subprocess.call(command, shell=True) - command = 'wget https://ubuntu.cyberpanel.net/pool/main/p/pure-ftpd/pure-ftpd-mysql_1.0.47-3_amd64.deb' - install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) + command = 'echo "/etc/pure-ftpd/db/mysql.conf" > /etc/pure-ftpd/conf/MySQLConfigFile' + subprocess.call(command, shell=True) - command = 'dpkg --install --force-confold pure-ftpd-common_1.0.47-3_all.deb' + command = 'ln -s /etc/pure-ftpd/conf/MySQLConfigFile /etc/pure-ftpd/auth/30mysql' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) - command = 'dpkg --install --force-confold pure-ftpd-mysql_1.0.47-3_amd64.deb' + command = 'ln -s /etc/pure-ftpd/conf/UnixAuthentication /etc/pure-ftpd/auth/65unix' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR) command = 'systemctl restart pure-ftpd-mysql.service'