push more packages to repo

This commit is contained in:
Usman Nasir
2020-04-10 16:50:11 +05:00
parent 5e63e839a2
commit 923f7c1d40
6 changed files with 5 additions and 71 deletions

View File

@@ -1305,7 +1305,7 @@ fi
fi
#fix php.ini & issue
clear
#clear
echo "###################################################################"
echo " CyberPanel Successfully Installed "
echo " "

View File

@@ -677,24 +677,9 @@ class preFlightsChecks:
def install_postfix_davecot(self):
self.stdOut("Install dovecot - first remove postfix")
if self.distro == centos:
path = '/etc/yum.repos.d/dovecot.repo'
content = """[dovecot-2.3-latest]
name=Dovecot 2.3 CentOS $releasever - $basearch
baseurl=http://repo.dovecot.org/ce-2.3-latest/centos/$releasever/RPMS/$basearch
gpgkey=https://repo.dovecot.org/DOVECOT-REPO-GPG
gpgcheck=1
enabled=1"""
writeToFile = open(path, 'w')
writeToFile.write(content)
writeToFile.close()
try:
if self.distro == centos:
command = 'yum -y install http://cyberpanel.sh/gf-release-latest.gf.el7.noarch.rpm'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'yum remove postfix -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
elif self.distro == ubuntu:
@@ -706,7 +691,7 @@ enabled=1"""
self.stdOut("Install dovecot - do the install")
if self.distro == centos:
command = 'yum install --enablerepo=gf-plus -y postfix3 postfix3-ldap postfix3-mysql postfix3-pcre'
command = 'yum install --enablerepo=CyberPanel -y postfix3 postfix3-ldap postfix3-mysql postfix3-pcre'
elif self.distro == cent8:
command = 'dnf install postfix postfix-mysql -y'
else:
@@ -735,7 +720,7 @@ enabled=1"""
##
if self.distro == centos or self.distro == cent8:
command = 'yum -y install dovecot dovecot-mysql'
command = 'yum --enablerepo=CyberPanel -y install dovecot dovecot-mysql'
else:
command = 'apt-get -y install dovecot-mysql'
@@ -2050,14 +2035,7 @@ milter_default_action = accept
CentOSPath = '/etc/redhat-release'
if os.path.exists(CentOSPath):
command = 'yum install yum-utils -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
command = 'yum install restic -y'
command = 'yum --enablerepo=CyberPanel install restic -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
else:
command = 'apt-get update -y'
@@ -2066,10 +2044,6 @@ milter_default_action = accept
command = 'apt-get install restic -y'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
cronTab = '/etc/crontab'
data = open(cronTab, 'r').read()
except:
pass

View File

@@ -207,28 +207,6 @@ class InstallCyberPanel:
install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
def setup_mariadb_repo(self):
try:
if self.distro == ubuntu:
# Only needed if the repo is broken or we need the latest version.
# command = "apt-get -y install software-properties-common"
# command = "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8"
# command = "add-apt-repository 'deb [arch=amd64] http://mirror.zol.co.zw/mariadb/repo/10.3/ubuntu bionic main'"
return
InstallCyberPanel.stdOut("Setting up MariaDB Repo..", 1)
os.chdir(self.cwd)
shutil.copy("mysql/MariaDB.repo","/etc/yum.repos.d/MariaDB.repo")
InstallCyberPanel.stdOut("MariaDB repo set!", 1)
except BaseException as msg:
logging.InstallLog.writeToFile('[ERROR] ' + str(msg) + " [setup_mariadb_repo]")
return 0
def installMySQL(self, mysql):
############## Install mariadb ######################
@@ -236,7 +214,7 @@ class InstallCyberPanel:
if self.distro == ubuntu:
command = "apt-get -y install mariadb-server"
else:
command = 'yum -y install mariadb-server'
command = 'yum --enablerepo=CyberPanel -y install mariadb-server'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
@@ -500,11 +478,6 @@ class InstallCyberPanel:
# ". This may need to be fixed manually as 'echo \"nameserver 8.8.8.8\"> "
# "/etc/resolv.conf'", 1, 1, os.EX_OSERR)
if self.distro == centos:
command = 'curl -o /etc/yum.repos.d/powerdns-auth-42.repo ' \
'https://repo.powerdns.com/repo-files/centos-auth-42.repo'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
if self.distro == cent8:
command = 'dnf config-manager --set-enabled PowerTools'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)

View File

@@ -166,8 +166,6 @@ class ApplicationInstaller(multi.Thread):
command = 'apt -y install git'
ProcessUtilities.executioner(command)
else:
command = 'yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
ProcessUtilities.executioner(command)
command = 'yum install git -y'
ProcessUtilities.executioner(command)

View File

@@ -1,9 +0,0 @@
import os
import subprocess
rootdir = '/home/repo.cyberpanel.net/public_html/epel/Packages'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
if file.endswith('.rpm'):
command = 'rpm --resign %s/%s' % (subdir, file)
subprocess.call(command, shell=True)

View File

@@ -1282,8 +1282,6 @@ class Upgrade:
command = 'apt -y install git'
Upgrade.executioner(command, 'installGit', 0)
else:
command = 'sudo yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
Upgrade.executioner(command, 'installGit', 0)
command = 'sudo yum install git -y'
Upgrade.executioner(command, 'installGit', 0)