관리-도구
편집 파일: system_id_shift.cpython-311.pyc
� b��f7 � �� � d dl Z d dlZd dlZd dlmZ d dlmZmZ d dlm Z d dl mZ e j d� � Z defd�Zd � Zd edefd�Zdd�Zdd �Zdd�Zdd�Zdd�Zd� Zd� Zd� ZdS )� N)�iglob)�request_data_storage�local_tasks_storage)�dbm_storage)�Task�reconfiguration�returnc � � dS )za Return all possible locations of xray.ini files in glob-like form Panel independent )z/opt/alt/php*/link/confz%/var/cagefs/*/*/etc/cl.php.d/alt-php*z"/opt/cpanel/ea-php*/root/etc/php.dz/opt/plesk/php/*/etc/php.dz/usr/local/php*/lib/php.conf.dzD/usr/share/cagefs/.cpanel.multiphp/opt/cpanel/ea-php*/root/etc/php.dz8/usr/share/cagefs-skeleton/usr/local/php*/lib/php.conf.d� r � �[/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/reconfiguration/system_id_shift.py� get_locationsr s � � � r c � � t j | � � dS # t $ r'}t � d| |� � Y d}~dS d}~ww xY w)zWrapped unlinkz%s not removed, reason: %sN)�os�unlink�OSError�logger�warning)�_fpath�es r �safe_unlinkr $ sj � �@� � �&�������� @� @� @����3�V�Q�?�?�?�?�?�?�?�?�?�����@���s � � A �A�A �globpathc # � K � t | � � D ]?}t j |� � D ](}d|v r"t j � ||� � V � �)�@dS )zp Find xray.ini files in every directory matching given glob-like path. Return full path to xray.ini zxray.iniN)r r �listdir�path�join)r �conf_dir�names r �find_xray_inisr , sm � � � � �(�O�O� 3� 3���J�x�(�(� 3� 3�D��T�!�!��g�l�l�8�T�2�2�2�2�2�� 3�3� 3r c � � t � � D ]>} t | � � D ],}t � d|� � t |� � �-�?dS )z7 Remove all xray.ini files found in filesystem �Removing %sN)r r r �infor )�location�xray_inis r �remove_xray_inisr% 7 sb � � "�O�O� "� "��&�x�0�0� "� "�H��K�K� �x�0�0�0���!�!�!�!� "�"� "r c �~ � t d� � D ],} t � d| � � t | � � �-dS )z9 Remove all xray.tasks files found in filesystem �*/usr/share/alt-php-xray-tasks/*/xray.tasksr! N)r r r"