mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
cent8 repos
This commit is contained in:
@@ -254,7 +254,7 @@ class preFlightsChecks:
|
|||||||
def setup_account_cyberpanel(self):
|
def setup_account_cyberpanel(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = "yum install sudo -y"
|
command = "yum install sudo -y"
|
||||||
preFlightsChecks.call(command, self.distro, command,
|
preFlightsChecks.call(command, self.distro, command,
|
||||||
command,
|
command,
|
||||||
@@ -441,7 +441,7 @@ class preFlightsChecks:
|
|||||||
def install_psmisc(self):
|
def install_psmisc(self):
|
||||||
self.stdOut("Install psmisc")
|
self.stdOut("Install psmisc")
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = "yum -y install psmisc"
|
command = "yum -y install psmisc"
|
||||||
else:
|
else:
|
||||||
command = "apt-get -y install psmisc"
|
command = "apt-get -y install psmisc"
|
||||||
@@ -684,7 +684,7 @@ class preFlightsChecks:
|
|||||||
def install_unzip(self):
|
def install_unzip(self):
|
||||||
self.stdOut("Install unzip")
|
self.stdOut("Install unzip")
|
||||||
try:
|
try:
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'yum -y install unzip'
|
command = 'yum -y install unzip'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y install unzip'
|
command = 'apt-get -y install unzip'
|
||||||
@@ -696,7 +696,7 @@ class preFlightsChecks:
|
|||||||
def install_zip(self):
|
def install_zip(self):
|
||||||
self.stdOut("Install zip")
|
self.stdOut("Install zip")
|
||||||
try:
|
try:
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'yum -y install zip'
|
command = 'yum -y install zip'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y install zip'
|
command = 'apt-get -y install zip'
|
||||||
@@ -779,6 +779,8 @@ enabled=1"""
|
|||||||
|
|
||||||
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=gf-plus -y postfix3 postfix3-ldap postfix3-mysql postfix3-pcre'
|
||||||
|
elif self.distro == cent8:
|
||||||
|
command = 'dnf install postfix postfix-ldap postfix-mysql postfix-pcre -y'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y debconf-utils'
|
command = 'apt-get -y debconf-utils'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
@@ -1342,7 +1344,7 @@ imap_folder_list_limit = 0
|
|||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
######
|
######
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
# Not available in ubuntu
|
# Not available in ubuntu
|
||||||
command = 'systemctl restart dbus'
|
command = 'systemctl restart dbus'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
@@ -1423,14 +1425,14 @@ imap_folder_list_limit = 0
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'adduser lscpd -M -d /usr/local/lscp'
|
command = 'adduser lscpd -M -d /usr/local/lscp'
|
||||||
else:
|
else:
|
||||||
command = 'useradd lscpd -M -d /usr/local/lscp'
|
command = 'useradd lscpd -M -d /usr/local/lscp'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'groupadd lscpd'
|
command = 'groupadd lscpd'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
# Added group in useradd for Ubuntu
|
# Added group in useradd for Ubuntu
|
||||||
@@ -1653,21 +1655,21 @@ imap_folder_list_limit = 0
|
|||||||
try:
|
try:
|
||||||
## first install crontab
|
## first install crontab
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'yum install cronie -y'
|
command = 'yum install cronie -y'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y install cron'
|
command = 'apt-get -y install cron'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'systemctl enable crond'
|
command = 'systemctl enable crond'
|
||||||
else:
|
else:
|
||||||
command = 'systemctl enable cron'
|
command = 'systemctl enable cron'
|
||||||
|
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'systemctl start crond'
|
command = 'systemctl start crond'
|
||||||
else:
|
else:
|
||||||
command = 'systemctl start cron'
|
command = 'systemctl start cron'
|
||||||
@@ -1693,7 +1695,7 @@ imap_folder_list_limit = 0
|
|||||||
command = 'chmod +x /usr/local/CyberCP/postfixSenderPolicy/client.py'
|
command = 'chmod +x /usr/local/CyberCP/postfixSenderPolicy/client.py'
|
||||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'systemctl restart crond.service'
|
command = 'systemctl restart crond.service'
|
||||||
else:
|
else:
|
||||||
command = 'systemctl restart cron.service'
|
command = 'systemctl restart cron.service'
|
||||||
@@ -1720,7 +1722,7 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
def install_rsync(self):
|
def install_rsync(self):
|
||||||
try:
|
try:
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'yum -y install rsync'
|
command = 'yum -y install rsync'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y install rsync'
|
command = 'apt-get -y install rsync'
|
||||||
@@ -1776,7 +1778,7 @@ imap_folder_list_limit = 0
|
|||||||
|
|
||||||
def installOpenDKIM(self):
|
def installOpenDKIM(self):
|
||||||
try:
|
try:
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
command = 'yum -y install opendkim'
|
command = 'yum -y install opendkim'
|
||||||
else:
|
else:
|
||||||
command = 'apt-get -y install opendkim'
|
command = 'apt-get -y install opendkim'
|
||||||
|
|||||||
@@ -470,13 +470,17 @@ class InstallCyberPanel:
|
|||||||
# "/etc/resolv.conf'", 1, 1, os.EX_OSERR)
|
# "/etc/resolv.conf'", 1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == centos:
|
if self.distro == centos:
|
||||||
command = 'yum -y install epel-release'
|
|
||||||
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
|
||||||
|
|
||||||
command = 'curl -o /etc/yum.repos.d/powerdns-auth-42.repo ' \
|
command = 'curl -o /etc/yum.repos.d/powerdns-auth-42.repo ' \
|
||||||
'https://repo.powerdns.com/repo-files/centos-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)
|
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)
|
||||||
|
|
||||||
|
command = 'curl -o /etc/yum.repos.d/powerdns-auth-master.repo https://repo.powerdns.com/repo-files/centos-auth-master.repo'
|
||||||
|
install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
|
||||||
|
|
||||||
if self.distro == ubuntu:
|
if self.distro == ubuntu:
|
||||||
command = "DEBIAN_FRONTEND=noninteractive apt-get -y install pdns-server pdns-backend-mysql"
|
command = "DEBIAN_FRONTEND=noninteractive apt-get -y install pdns-server pdns-backend-mysql"
|
||||||
os.system(command)
|
os.system(command)
|
||||||
@@ -495,7 +499,7 @@ class InstallCyberPanel:
|
|||||||
InstallCyberPanel.stdOut("Configuring PowerDNS..", 1)
|
InstallCyberPanel.stdOut("Configuring PowerDNS..", 1)
|
||||||
|
|
||||||
os.chdir(self.cwd)
|
os.chdir(self.cwd)
|
||||||
if self.distro == centos:
|
if self.distro == centos or self.distro == cent8:
|
||||||
dnsPath = "/etc/pdns/pdns.conf"
|
dnsPath = "/etc/pdns/pdns.conf"
|
||||||
else:
|
else:
|
||||||
dnsPath = "/etc/powerdns/pdns.conf"
|
dnsPath = "/etc/powerdns/pdns.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user