Skip to content

Commit 939b6fb

Browse files
committed
add cyberpanel repo
1 parent daa5082 commit 939b6fb

File tree

4 files changed

+17
-87
lines changed

4 files changed

+17
-87
lines changed

cyberpanel.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ fi
398398

399399

400400
install_required() {
401+
curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo
401402
if [[ $SERVER_COUNTRY == "CN" ]] ; then
402403
mkdir /root/.config
403404
mkdir /root/.config/pip
@@ -425,14 +426,13 @@ if [[ $SERVER_OS == "CentOS" ]] ; then
425426
yum autoremove epel-release -y
426427
rm -f /etc/yum.repos.d/epel.repo
427428
rm -f /etc/yum.repos.d/epel.repo.rpmsave
428-
yum install epel-release -y
429429

430430
if [[ $CENTOS_8 == "False" ]] ; then
431-
yum install -y wget strace htop net-tools telnet curl which bc telnet htop libevent-devel gcc python-devel libattr-devel xz-devel gpgme-devel mariadb-devel curl-devel python-pip git socat
431+
yum install -y wget strace htop net-tools telnet curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel gpgme-devel curl-devel git socat
432432
check_return
433433
fi
434434
if [[ $CENTOS_8 == "True" ]] ; then
435-
yum install -y wget strace htop net-tools telnet curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git platform-python-devel tar socat
435+
yum install -y wget strace htop net-tools telnet curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel curl-devel git tar socat
436436
check_return
437437
dnf --enablerepo=PowerTools install gpgme-devel -y
438438
check_return
@@ -442,11 +442,6 @@ if [[ $DEV == "ON" ]] ; then
442442
if [[ $CENTOS_8 == "False" ]] ; then
443443
yum -y install yum-utils
444444
yum -y groupinstall development
445-
if [[ $SERVER_COUNTRY == "CN" ]] ; then
446-
wget -O /etc/yum.repos.d/ius.repo https://$DOWNLOAD_SERVER/ius/ius.repo
447-
else
448-
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
449-
fi
450445
yum -y install python36u python36u-pip python36u-devel
451446
check_return
452447
fi

install/CyberPanel.repo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[CyberPanel]
2+
name=CyberPanel
3+
baseurl=https://repo.cyberpanel.net/
4+
gpgkey=https://repo.cyberpanel.net/RPM-GPG-KEY-cyberpanel
5+
gpgcheck=1

install/install.py

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,6 @@ def setup_account_cyberpanel(self):
304304
except BaseException as msg:
305305
logging.InstallLog.writeToFile("[ERROR] setup_account_cyberpanel. " + str(msg))
306306

307-
def yum_update(self):
308-
command = 'yum update -y'
309-
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
310-
311307
def installCyberPanelRepo(self):
312308
self.stdOut("Install Cyberpanel repo")
313309

@@ -333,60 +329,6 @@ def installCyberPanelRepo(self):
333329
command = 'rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm'
334330
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
335331

336-
def enableEPELRepo(self):
337-
command = 'yum -y install epel-release'
338-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
339-
340-
def install_pip(self):
341-
self.stdOut("Install pip")
342-
if self.distro == ubuntu:
343-
command = "apt-get -y install python-pip"
344-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
345-
elif self.distro == centos:
346-
command = "yum -y install python-pip"
347-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
348-
349-
350-
def install_python_dev(self):
351-
self.stdOut("Install python development environment")
352-
353-
if self.distro == centos:
354-
command = "yum -y install python-devel"
355-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
356-
elif self.distro == ubuntu:
357-
command = "apt-get -y install python-dev"
358-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
359-
360-
361-
362-
def install_gcc(self):
363-
self.stdOut("Install gcc")
364-
365-
if self.distro == centos:
366-
command = "yum -y install gcc"
367-
else:
368-
command = "apt-get -y install gcc"
369-
370-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
371-
372-
def install_python_setup_tools(self):
373-
command = "yum -y install python-setuptools"
374-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
375-
376-
def install_python_mysql_library(self):
377-
self.stdOut("Install MySQL python library")
378-
379-
if self.distro == centos:
380-
command = "yum install mariadb-devel gcc python36u-devel -y"
381-
else:
382-
command = "apt-get -y install libmysqlclient-dev"
383-
384-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
385-
386-
if self.distro == ubuntu:
387-
command = "pip install MySQL-python"
388-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
389-
390332
def fix_selinux_issue(self):
391333
try:
392334
cmd = []
@@ -415,24 +357,11 @@ def install_psmisc(self):
415357

416358
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
417359

418-
def installGit(self):
419-
if os.path.exists("/etc/lsb-release"):
420-
command = 'apt -y install git'
421-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
422-
else:
423-
command = 'yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
424-
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
425-
426-
command = 'yum install git -y'
427-
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
428-
429360
def download_install_CyberPanel(self, mysqlPassword, mysql):
430361
##
431362

432363
os.chdir(self.path)
433364

434-
self.installGit()
435-
436365
os.chdir('/usr/local')
437366

438367
command = "git clone https://github.com/usmannasir/cyberpanel"
@@ -2236,9 +2165,6 @@ def installRedis(self):
22362165
command = 'systemctl enable redis'
22372166
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
22382167

2239-
2240-
2241-
22422168
def main():
22432169
parser = argparse.ArgumentParser(description='CyberPanel Installer')
22442170
parser.add_argument('publicip', help='Please enter public IP for your VPS or dedicated server.')
@@ -2307,10 +2233,6 @@ def main():
23072233
checks.checkPythonVersion()
23082234
checks.setup_account_cyberpanel()
23092235
checks.installCyberPanelRepo()
2310-
#checks.install_gcc()
2311-
if distro == centos:
2312-
checks.install_python_setup_tools()
2313-
#checks.install_python_mysql_library()
23142236

23152237
import installCyberPanel
23162238

@@ -2348,7 +2270,6 @@ def main():
23482270
checks.setup_cron()
23492271
checks.installRestic()
23502272
checks.installAcme()
2351-
# checks.installdnsPython()
23522273

23532274
## Install and Configure OpenDKIM.
23542275

plogical/test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import os
2+
import subprocess
3+
rootdir = '/home/repo.cyberpanel.net/public_html/epel/Packages'
4+
5+
for subdir, dirs, files in os.walk(rootdir):
6+
for file in files:
7+
if file.endswith('.rpm'):
8+
command = 'rpm --resign %s/%s' % (subdir, file)
9+
subprocess.call(command, shell=True)

0 commit comments

Comments
 (0)