add ols install

This commit is contained in:
Usman Nasir
2019-12-17 21:50:22 +05:00
parent 092bffaa5f
commit 4d0d4e6817
2 changed files with 19 additions and 2 deletions

View File

@@ -343,6 +343,7 @@ if [[ $SERVER_OS == "CentOS" ]] ; then
yum -y install platform-python-devel
dnf --enablerepo=PowerTools install gpgme-devel -y
yum -y install python3-pip
yum install wget -y
fi
if [[ $DEV == "ON" ]] ; then

View File

@@ -11,6 +11,7 @@ import install
#distros
centos=0
ubuntu=1
cent8=2
class InstallCyberPanel:
@@ -35,10 +36,25 @@ class InstallCyberPanel:
if self.ent == 0:
if self.distro == ubuntu:
command = "apt-get -y install openlitespeed"
else:
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
elif self.distro == centos:
command = 'yum install -y openlitespeed'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
else:
command = 'wget https://openlitespeed.org/packages/openlitespeed-1.5.0.tgz'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
command = 'tar -zxvf openlitespeed-*.tgz'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
os.chdir('openlitespeed')
command = './install.sh'
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
os.chdir(self.cwd)
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
else:
try:
try: