mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
push more packages to repo
This commit is contained in:
@@ -1305,7 +1305,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
#fix php.ini & issue
|
#fix php.ini & issue
|
||||||
|
|
||||||
clear
|
#clear
|
||||||
echo "###################################################################"
|
echo "###################################################################"
|
||||||
echo " CyberPanel Successfully Installed "
|
echo " CyberPanel Successfully Installed "
|
||||||
echo " "
|
echo " "
|
||||||
|
|||||||
@@ -677,24 +677,9 @@ class preFlightsChecks:
|
|||||||
def install_postfix_davecot(self):
|
def install_postfix_davecot(self):
|
||||||
self.stdOut("Install dovecot - first remove postfix")
|
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:
|
try:
|
||||||
if self.distro == centos:
|
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'
|
command = 'yum remove postfix -y'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
elif self.distro == ubuntu:
|
elif self.distro == ubuntu:
|
||||||
@@ -706,7 +691,7 @@ enabled=1"""
|
|||||||
self.stdOut("Install dovecot - do the install")
|
self.stdOut("Install dovecot - do the install")
|
||||||
|
|
||||||
if self.distro == centos:
|
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:
|
elif self.distro == cent8:
|
||||||
command = 'dnf install postfix postfix-mysql -y'
|
command = 'dnf install postfix postfix-mysql -y'
|
||||||
else:
|
else:
|
||||||
@@ -735,7 +720,7 @@ enabled=1"""
|
|||||||
##
|
##
|
||||||
|
|
||||||
if self.distro == centos or self.distro == cent8:
|
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:
|
else:
|
||||||
command = 'apt-get -y install dovecot-mysql'
|
command = 'apt-get -y install dovecot-mysql'
|
||||||
|
|
||||||
@@ -2050,14 +2035,7 @@ milter_default_action = accept
|
|||||||
CentOSPath = '/etc/redhat-release'
|
CentOSPath = '/etc/redhat-release'
|
||||||
|
|
||||||
if os.path.exists(CentOSPath):
|
if os.path.exists(CentOSPath):
|
||||||
|
command = 'yum --enablerepo=CyberPanel install restic -y'
|
||||||
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'
|
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
else:
|
else:
|
||||||
command = 'apt-get update -y'
|
command = 'apt-get update -y'
|
||||||
@@ -2066,10 +2044,6 @@ milter_default_action = accept
|
|||||||
command = 'apt-get install restic -y'
|
command = 'apt-get install restic -y'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
cronTab = '/etc/crontab'
|
|
||||||
|
|
||||||
data = open(cronTab, 'r').read()
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -207,28 +207,6 @@ class InstallCyberPanel:
|
|||||||
|
|
||||||
install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
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):
|
def installMySQL(self, mysql):
|
||||||
|
|
||||||
############## Install mariadb ######################
|
############## Install mariadb ######################
|
||||||
@@ -236,7 +214,7 @@ class InstallCyberPanel:
|
|||||||
if self.distro == ubuntu:
|
if self.distro == ubuntu:
|
||||||
command = "apt-get -y install mariadb-server"
|
command = "apt-get -y install mariadb-server"
|
||||||
else:
|
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)
|
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\"> "
|
# ". This may need to be fixed manually as 'echo \"nameserver 8.8.8.8\"> "
|
||||||
# "/etc/resolv.conf'", 1, 1, os.EX_OSERR)
|
# "/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:
|
if self.distro == cent8:
|
||||||
command = 'dnf config-manager --set-enabled PowerTools'
|
command = 'dnf config-manager --set-enabled PowerTools'
|
||||||
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)
|
||||||
|
|||||||
@@ -166,8 +166,6 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
command = 'apt -y install git'
|
command = 'apt -y install git'
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
else:
|
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'
|
command = 'yum install git -y'
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -1282,8 +1282,6 @@ class Upgrade:
|
|||||||
command = 'apt -y install git'
|
command = 'apt -y install git'
|
||||||
Upgrade.executioner(command, 'installGit', 0)
|
Upgrade.executioner(command, 'installGit', 0)
|
||||||
else:
|
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'
|
command = 'sudo yum install git -y'
|
||||||
Upgrade.executioner(command, 'installGit', 0)
|
Upgrade.executioner(command, 'installGit', 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user