Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/__pycache__/feature.cpython-311.pyc



sjdZddlmZmZddlmZmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZGdd	eZGd
deZGdd
eZdS)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 <https://www.gnu.org/licenses/>.

Copyright © 2019 Cloud Linux Software Inc.

This software is also available under ImunifyAV commercial license,
see <https://www.imunify360.com/legal/eula>
)CoreANTIVIRUS_MODE)
OsReleaseInforun_cmd_and_log_outside_sandbox)AbstractFeatureFeatureError
FeatureStatus)PATCHMAN_PACKAGE)REALTIME_PACKAGEis_installedrceZdZUdZdZeed<dZeed<dZeed<dZ	eed<e
dZdefd	Z
ejd
ZejdZdedefd
ZdS)_AbstractPackageFeaturezO
    Provides an interface for installing *PACKAGE_NAME* in the background
    NNAMEPACKAGE_NAMEINSTALL_LOG_FILE_MASKREMOVE_LOG_FILE_MASKcJtjtjzrdndS)Nzapt-getyum)rid_likeDEBIANselfs J/opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/feature.pypackage_managerz'_AbstractPackageFeature.package_manager2s)$&&)==
II	
returncK|jSNr
rs r_check_installed_implz-_AbstractPackageFeature._check_installed_impl:s  rcbKt|jd|j|jddid{VS)Nz -y install DEBIAN_FRONTENDnoninteractive)env)rrrrrs rinstallz_AbstractPackageFeature.install=sc
5#DD1BDD&"$45








	
rcZKt|jd|j|jd{VS)Nz -y remove )rrrrrs rremovez_AbstractPackageFeature.removeHsS4#CC0ACC%







	
rstatusc^K|d{Vdd}||kS)Nitemsr()r()rr(current_statuss   r
has_statusz"_AbstractPackageFeature.has_statusOs: $

------w7A''r)__name__
__module____qualname____doc__rstr__annotations__rrrpropertyrboolr rraise_if_shouldnt_install_nowr%raise_if_shouldnt_remove_nowr'r	r,rrrr(sD#L#!%3%%% $#$$$


X
!T!!!!2

32
1

21
(}(((((((rrcXeZdZdZeZdejdZdejdZ	e
dZdS)PatchmanFeaturepatchman	/var/log/z/install-patchman.log.*z/remove-patchman.log.*ctSr)is_patchman_installedrs rrzPatchmanFeature.is_installedZs$&&&rN)r-r.r/rr
rrPRODUCTrrr3rr7rrr9r9Ts]D#LMMMMKt|KKK
''X'''rr9cneZdZdZeZdejdZdejdZ	e
defdZfdZ
xZS)RealtimeFeaturezrealtime-avr;z/install-realtime-av.log.*z/remove-realtime-av.log.*rctSr)is_realtime_av_installedrs rrzRealtimeFeature.is_installedgs')))rcKtstdtd{VdS)NzKCan't remove imunify-realtime-av, since it is a part of imunify360-firewall)rrsuperr')r	__class__s rr'zRealtimeFeature.removeksT	<
ggnnr)r-r.r/rrrrr>rrr3r4rr'
__classcell__)rEs@rr@r@_sD#L<DL<<<Ot|NNN
*d***X*rr@N)r0 defence360agent.contracts.configrrdefence360agent.utilsrr0defence360agent.subsys.features.abstract_featurerrr	imav.patchman.constantsr
imav.subsys.realtime_avrrrBimav.patchman.stater=rr9r@r7rr<module>rMs`*BAAAAAAA
544444FEEEEE)()()()()(o)()()(X'''''-'''-r
Back to Directory File Manager