mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-30 03:09:06 +01:00
check and install imunify during upgrade
This commit is contained in:
@@ -118,6 +118,16 @@ class CageFS:
|
||||
def submitinstallImunify(key):
|
||||
try:
|
||||
|
||||
imunifyKeyPath = '/home/cyberpanel/imunifyKeyPath'
|
||||
|
||||
##
|
||||
|
||||
writeToFile = open(imunifyKeyPath, 'w')
|
||||
writeToFile.write(key)
|
||||
writeToFile.close()
|
||||
|
||||
##
|
||||
|
||||
mailUtilities.checkHome()
|
||||
|
||||
statusFile = open(ServerStatusUtil.lswsInstallStatusPath, 'w')
|
||||
|
||||
@@ -2123,6 +2123,22 @@ vmail
|
||||
writeToFile.close()
|
||||
|
||||
|
||||
@staticmethod
|
||||
def checkImunify():
|
||||
|
||||
imunifyKeyPath = '/home/cyberpanel/imunifyKeyPath'
|
||||
|
||||
if os.path.exists(imunifyKeyPath):
|
||||
key = open(imunifyKeyPath, 'r').read().rstrip('\n')
|
||||
|
||||
if not os.path.exists('i360deploy.sh'):
|
||||
command = 'wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh'
|
||||
Upgrade.executioner(command, command)
|
||||
|
||||
command = 'bash i360deploy.sh --key %s --beta' % (key)
|
||||
Upgrade.executioner(command, command)
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def upgrade(branch):
|
||||
@@ -2212,6 +2228,7 @@ vmail
|
||||
time.sleep(3)
|
||||
|
||||
## Upgrade version
|
||||
Upgrade.checkImunify()
|
||||
Upgrade.fixPermissions()
|
||||
Upgrade.upgradeVersion()
|
||||
Upgrade.UpdateMaxSSLCons()
|
||||
|
||||
Reference in New Issue
Block a user