ubuntu 20

This commit is contained in:
Usman Nasir
2020-05-11 01:03:51 +05:00
parent b16fb1f058
commit 5c87a7c32e
2 changed files with 38 additions and 9 deletions

View File

@@ -554,7 +554,7 @@ elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then
echo -e "\nDetecting CentOS 8.X...\n"
SERVER_OS="CentOS"
CENTOS_8="True"
elif echo $OUTPUT | grep -q "Ubuntu" ; then
elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then
if uname -m | grep -q 64 ; then
echo -e "\nDetecting Ubuntu 18.04...\n"
SERVER_OS="Ubuntu"
@@ -562,6 +562,14 @@ elif echo $OUTPUT | grep -q "Ubuntu" ; then
echo -e "\nUbuntu 18.04 x32 detected...ths only works on x64 system."
exit
fi
elif echo $OUTPUT | grep -q "Ubuntu 20" ; then
if uname -m | grep -q 64 ; then
echo -e "\nDetecting Ubuntu 20...\n"
SERVER_OS="Ubuntu"
else
echo -e "\nUbuntu 20 x32 detected...ths only works on x64 system."
exit
fi
else
cat /etc/*release
echo -e "\nUnable to detect your OS...\n"

View File

@@ -7,12 +7,32 @@ import randomPassword
import errno
import MySQLdb as mariadb
import install
from os.path import exists
#distros
centos=0
ubuntu=1
cent8=2
def get_Ubuntu_release():
release = -1
if exists("/etc/lsb-release"):
distro_file = "/etc/lsb-release"
with open(distro_file) as f:
for line in f:
if line[:16] == "DISTRIB_RELEASE=":
release = float(line[16:])
if release == -1:
print("Can't find distro release name in " + distro_file + " - fatal error")
else:
logging.InstallLog.writeToFile("Can't find linux release file - fatal error")
print("Can't find linux release file - fatal error")
os._exit(os.EX_UNAVAILABLE)
return release
class InstallCyberPanel:
mysql_Root_password = ""
@@ -333,17 +353,18 @@ class InstallCyberPanel:
command = 'DEBIAN_FRONTEND=noninteractive apt install pure-ftpd-mysql -y'
os.system(command)
command = 'wget https://rep.cyberpanel.net/pure-ftpd-common_1.0.47-3_all.deb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
if get_Ubuntu_release() == 18.10:
command = 'wget https://rep.cyberpanel.net/pure-ftpd-common_1.0.47-3_all.deb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
command = 'wget https://rep.cyberpanel.net/pure-ftpd-mysql_1.0.47-3_amd64.deb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
command = 'wget https://rep.cyberpanel.net/pure-ftpd-mysql_1.0.47-3_amd64.deb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
command = 'dpkg --install --force-confold pure-ftpd-common_1.0.47-3_all.deb'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
command = 'dpkg --install --force-confold pure-ftpd-common_1.0.47-3_all.deb'
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'
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'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
elif self.distro == centos:
command = "yum install -y pure-ftpd"