Edit File: uninstall_cleanup.cpython-311.pyc
� ��\h� � � � d dl Z d dlZd dlmZ d dlmZmZ d dlmZ d dl m Z d dlmZ d dl mZmZ e j e� � Z G d� d e� � ZdS ) � N)� AcronisBackup)� RootEndpoints�bind)�Scope)�LFD)�csf)�OUT�TCPc � � e Zd Zej Z ed� � d� � � Z ed� � d� � � Z ed� � d� � � Z dS )�UninstallCleanupEndpointszremove-csf-portsc � � K � t j � t j � � st j d� � d S t j }t j }t j t t g|�R d|i� t j � � � d {V �� t j d� � d S # t $ r t � d� � Y d S w xY w)Nz*Nothing to do, there is no csf config file�rangesz2Successfully removed Acronis ports from csf configz.Failed to remove Arconis ports from csf config)�os�path�isfiler � CSF_CONFIG�logging�infor �PORTS�RANGE�remove_portsr r �restart_all� Exception�logger� exception)�self�portsr s �W/opt/imunify360/venv/lib/python3.11/site-packages/im360/simple_rpc/uninstall_cleanup.py�remove_csf_portsz*UninstallCleanupEndpoints.remove_csf_ports s� � � � ��w�~�~�c�n�-�-� ��L�E�F�F�F��F� O�!�'�E�"�(�F���S�#�=��=�=�=�f�=�=�=��/�#�#�#�#�#�#�#�#�#��L�M�N�N�N�N�N��� O� O� O����M�N�N�N�N�N�N� O���s �A%B* �*$C�Czremove-block-report-scriptc � �V K � t � � � � � � d {V �� d S �N)r �shutdown�r s r �restore_block_report_scriptz5UninstallCleanupEndpoints.restore_block_report_script s2 � � � ��e�e�n�n������������ zrestore-configsc � �r K � | � � � � d {V �� | � � � � d {V �� d S r! )r r$ r# s r � pre_uninstallz'UninstallCleanupEndpoints.pre_uninstall$ sT � � � ��#�#�%�%�%�%�%�%�%�%�%��.�.�0�0�0�0�0�0�0�0�0�0�0r% N) �__name__� __module__�__qualname__r �IM360�SCOPEr r r$ r'