Skip to content

Commit

Permalink
disable certain package updates on centos
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Apr 23, 2020
1 parent faa4458 commit 3cedd8e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions install/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,19 @@ def installRedis(self):
command = 'systemctl enable redis'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)

def disablePackegeUpdates(self):
if self.distro == centos:

mainConfFile = '/etc/yum.conf'
content = 'exclude=MariaDB-client MariaDB-common MariaDB-devel MariaDB-server MariaDB-shared ' \
'pdns pdns-backend-mysql dovecot dovecot-mysql postfix3 postfix3-ldap postfix3-mysql ' \
'postfix3-pcre restic opendkim libopendkim pure-ftpd ftp\n'

writeToFile = open(mainConfFile, 'a')
writeToFile.write(content)
writeToFile.close()


def main():
parser = argparse.ArgumentParser(description='CyberPanel Installer')
parser.add_argument('publicip', help='Please enter public IP for your VPS or dedicated server.')
Expand Down Expand Up @@ -2200,6 +2213,7 @@ def main():
checks.enableDisableFTP('on', distro)

checks.installCLScripts()
checks.disablePackegeUpdates()
logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")


Expand Down

0 comments on commit 3cedd8e

Please sign in to comment.