관리-도구
편집 파일: directadmin.cpython-311.pyc
� b��f1 � � � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl Z ddl mZ ddl mZ ddlmZ d d lmZmZmZ d dlmZ d dlmZmZ G d � de� � ZdS )zS This module contains classes implementing X-Ray Manager behaviour for DirectAdmin � N)�ChainMap)�glob)�gettext)� phpinfo_utils� )�BaseManager� )�XRayManagerError�XRayMissingDomain�XRayManagerExit)� DomainInfo)�user_mode_verification�with_fpm_reload_restrictedc �r � � e Zd ZdZdZdZdZdZdZddd d ddd dddddd�Z de fd�Zdede fd�Zedefd�� � Zedefd�� � Zedefd�� � Zedefd�� � Zedefd�� � Zedefd�� � Zeededefd�� � � � Zd edefd!�Zd"edefd#�Zd edd$f� fd%�Z� xZS )&�DirectAdminManagerzG Class implementing an X-Ray manager behaviour for DirectAdmin z//usr/local/directadmin/custombuild/options.confz2/usr/local/directadmin/data/users/*/domains/*.confz8/usr/local/directadmin/data/users/*/domains/*.subdomainsz6/usr/local/directadmin/data/users/*/domains/*.pointerszI/usr/local/directadmin/data/users/*/domains/*.subdomains.docroot.overridez/usr/local/php54/lib/php.conf.dz/usr/local/php55/lib/php.conf.dz/usr/local/php56/lib/php.conf.dz/usr/local/php70/lib/php.conf.dz/usr/local/php71/lib/php.conf.dz/usr/local/php72/lib/php.conf.dz/usr/local/php73/lib/php.conf.dz/usr/local/php74/lib/php.conf.dz/usr/local/php80/lib/php.conf.dz/usr/local/php81/lib/php.conf.dz/usr/local/php82/lib/php.conf.dz/usr/local/php83/lib/php.conf.d)�php54�php55�php56�php70�php71�php72�php73�php74�php80�php81�php82�php83�returnc �6 � t | j | j � � S )z� Get supported PHP versions :return: a chained map with basic supported versions and DirectAdmin supported versions )r �VERSIONS�VERSIONS_DA)�selfs �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/manager/directadmin.py�supported_versionsz%DirectAdminManager.supported_versions; s � � �� ��(�*� *� *� �filenamec �n �� �fd�} t � |� � �� � 5 }d� |� � � D � � cddd� � S # 1 swxY w Y dS # t $ rQ}| j � d�t |� � d��� � t t d� � �z � � |�d}~ww xY w) z~ Read lines from file :param filename: a name of file to read :return: list of stripped lines c � �� t �d� � 5 } t j | � � � � � }ddd� � n# 1 swxY w Y |d S )z0 Retrieve file encoding �rbN�encoding)�open�chardet�detect�read)�f�resultr&