cent8 init
This commit is contained in:
parent
fc622d9bdd
commit
0c18173901
|
|
@ -338,11 +338,20 @@ if [[ $SERVER_OS == "CentOS" ]] ; then
|
|||
yum update -y
|
||||
yum install epel-release -y
|
||||
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
|
||||
|
||||
if [[ $CENT_8 == "True" ]] ; then
|
||||
yum -y install platform-python-devel
|
||||
dnf --enablerepo=PowerTools install gpgme-devel -y
|
||||
yum -y install python3-pip
|
||||
fi
|
||||
|
||||
if [[ $DEV == "ON" ]] ; then
|
||||
yum -y install yum-utils
|
||||
yum -y groupinstall development
|
||||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
yum -y install python36u python36u-pip python36u-devel
|
||||
if [[ $CENT_8 == "False" ]] ; then
|
||||
yum -y install yum-utils
|
||||
yum -y groupinstall development
|
||||
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
|
||||
yum -y install python36u python36u-pip python36u-devel
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -470,10 +479,11 @@ fi
|
|||
|
||||
}
|
||||
|
||||
|
||||
CENT_8="False"
|
||||
check_OS() {
|
||||
echo -e "\nChecking OS..."
|
||||
OUTPUT=$(cat /etc/*release)
|
||||
|
||||
if echo $OUTPUT | grep -q "CentOS Linux 7" ; then
|
||||
echo -e "\nDetecting CentOS 7.X...\n"
|
||||
SERVER_OS="CentOS"
|
||||
|
|
@ -483,11 +493,15 @@ elif echo $OUTPUT | grep -q "CloudLinux 7" ; then
|
|||
elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then
|
||||
echo -e "\nDetecting Ubuntu 18.04...\n"
|
||||
SERVER_OS="Ubuntu"
|
||||
elif echo $OUTPUT | grep -q "CentOS Linux 7" ; then
|
||||
echo -e "\nDetecting Ubuntu 18.04...\n"
|
||||
SERVER_OS="Centos8"
|
||||
CENT_8="True"
|
||||
else
|
||||
cat /etc/*release
|
||||
echo -e "\nUnable to detect your OS...\n"
|
||||
echo -e "\nCyberPanel is supported on Ubuntu 18.04, CentOS 7.x and CloudLinux 7.x...\n"
|
||||
exit 1
|
||||
# exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ def generate_pass(length=14):
|
|||
|
||||
centos = 0
|
||||
ubuntu = 1
|
||||
cent8 = 2
|
||||
|
||||
|
||||
def get_distro():
|
||||
|
|
@ -48,6 +49,11 @@ def get_distro():
|
|||
distro_file = "/etc/os-release"
|
||||
distro = centos
|
||||
|
||||
data = open('/etc/redhat-release', 'r').read()
|
||||
|
||||
if data.find('CentOS Linux release 8') > -1:
|
||||
return cent8
|
||||
|
||||
else:
|
||||
logging.InstallLog.writeToFile("Can't find linux release file - fatal error")
|
||||
preFlightsChecks.stdOut("Can't find linux release file - fatal error")
|
||||
|
|
@ -365,10 +371,11 @@ class preFlightsChecks:
|
|||
self.stdOut("Install pip")
|
||||
if self.distro == ubuntu:
|
||||
command = "apt-get -y install python-pip"
|
||||
else:
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
elif self.distro == centos:
|
||||
command = "yum -y install python-pip"
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||
|
||||
def install_python_dev(self):
|
||||
self.stdOut("Install python development environment")
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import django
|
|||
sys.path.append('/usr/local/CyberCP')
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
|
||||
django.setup()
|
||||
from . import CyberCPLogFileWriter as logging
|
||||
from plogical import CyberCPLogFileWriter as logging
|
||||
import subprocess
|
||||
import shlex
|
||||
import os
|
||||
import time
|
||||
from plogical.backupUtilities import backupUtilities
|
||||
from re import match,I,M
|
||||
from websiteFunctions.models import Websites, Backups
|
||||
from websiteFunctions.models import Backups
|
||||
from plogical.processUtilities import ProcessUtilities
|
||||
from random import randint
|
||||
import json, requests
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
from plogical import CyberCPLogFileWriter as logging
|
||||
import subprocess
|
||||
import shlex
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
import argparse
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
from plogical import CyberCPLogFileWriter as logging
|
||||
from plogical import backupUtilities as backupUtil
|
||||
import time
|
||||
from multiprocessing import Process
|
||||
import json
|
||||
import requests
|
||||
import subprocess
|
||||
import shlex
|
||||
from shutil import move
|
||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||
from plogical.processUtilities import ProcessUtilities
|
||||
from plogical.backupSchedule import backupSchedule
|
||||
import shutil
|
||||
|
||||
class remoteTransferUtilities:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import sys
|
||||
sys.path.append('/usr/local/CyberCP')
|
||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
||||
from plogical.installUtilities import installUtilities
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import plogical.CyberCPLogFileWriter as logging
|
|||
from plogical.tuning import tuning
|
||||
from loginSystem.views import loadLoginPage
|
||||
from plogical.virtualHostUtilities import virtualHostUtilities
|
||||
import subprocess
|
||||
import shlex
|
||||
from plogical.acl import ACLManager
|
||||
from plogical.processUtilities import ProcessUtilities
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue