관리-도구
편집 파일: configure.cpython-311.pyc
� ΈQg�# � �^ � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZm Z m Z mZ d dlm Z mZ d dlmZ d dlmZ d dlmZmZ d dlmZ d dlmZ e j d efd �� � Ze j d eeef dz fd�� � Zd efd�Z e j d � � � Z!dd�Z"dd�Z#defd�Z$ddedefd�Z%dS )� N)�BASEDIR�ETC_CL_PHP_PATH�ETC_CL_ALT_PATH�ETC_CL_ALT_CAGEFS_PATH�SYMLINKS)�make_userdir�switch_symlink)�get_user_prefix��get_alt_dirs)� clcaptain� clconfpars)� in_cagefs)�ExternalProgramFailed�returnc �@ � t j � d� � S )zI Return True if cPanel EasyApache4 (MultiPHP feature) is enabled z/etc/cpanel/ea4/is_ea4)�os�path�lexists� � ��/builddir/build/BUILDROOT/cagefs-7.6.22-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/selector/configure.py�is_ea4_enabledr s � � �7�?�?�3�4�4�4r c �� � t dd� � 5 } t j | t j � � cddd� � S # 1 swxY w Y dS # t j t f$ r Y dS w xY w)z� Read /etc/cpanel/ea4/php.conf return something like {'default': 'ea-php54', 'ea-php56': 'suphp', 'ea-php54': 'cgi', 'ea-php55': 'suphp'} return None if error has occured z/etc/cpanel/ea4/php.conf�rN)�open�yaml�load� SafeLoader� YAMLError�IOError)�fs r �read_cpanel_ea4_php_confr# s� � �� �,�c� 2� 2� 1�a��9�Q���0�0� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1���� 1� 1� 1� 1� 1� 1�� �N�G�$� � � ��t�t����s1 �A �>�A �A�A �A�A �A%�$A%c � � t � � r<t � � } | r, | d � d� � S # t $ r Y nw xY wdS )z� Return True when default system php version selected via MultiPHP Manager in cPanel WHM is ea-php (not alt-php) For details see CAG-774 �default�ea-phpT)r r# � startswith�KeyError)�confs r �!multiphp_system_default_is_ea_phpr* - sg � � ��� �'�)�)��� � ��I��1�1�(�;�;�;��� � � ��� �����4s �; � A�Ac �� � t � d�} t � � r t � d�} t j | d�� � } |d � � � dk S # t $ r Y dS w xY w)z� Return True if modules selected via PHP Selector (alt_php.ini) must be always used. Never use modules selected in cPanel MultiPHP Manager. See CAG-511 for details z/symlinks.rulesT)� ignore_errorszphp.d.location�selectorF)r r r r � load_once�lowerr( )�symlinks_rules_path� syml_ruless r �selector_modules_must_be_usedr2 <