$ d Z ddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ ee Zd Z ed
Zd ZdS )u
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
N)Path) getLogger)
LicenseCLN)cPanel)HostingPanel)MalwareTunez?https://repo.imunify360.cloudlinux.com/defence360/i360deploy.shz!/var/imunify360/tmp/i360deploy.shc $ K t j rt d dS t } t j }| d dk s| j t j k rdS t st j
dd t j t" d 5 }| }t | d d d n# 1 swxY w Y t d
t+ j dt dd
gd n3# t. $ r&}t d| Y d }~dS d }~ww xY wdS )z6
Deploys imunify360 for CPanel installations.
z8No upgrade flag file exists. Skipping imunify360 upgradeTstatusokF)parentsexist_ok
)timeoutNi z!/usr/libexec/report-command-errorIPLz-y)start_new_sessionz#Failed to upgrade to imunify360: %r)r NO_AUTO_UPGRADEloggerwarningr r get_tokengetNAMEr TARGET_PATHexistsparentmkdirurllibrequesturlopen
SOURCE_URLreadwrite_byteschmod
subprocessPopen Exceptionerror)hp
license_tokenresponsecontentes I/opt/imunify360/venv/lib/python3.11/site-packages/imav/internals/im360.pydeploy_im360r- &