관리-도구
편집 파일: php_manager.cpython-311.pyc
� %�4g�1 � �� � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ d dlm Z d dl Zd dlm Z mZ d dlmZ d d lmZmZmZ d d lmZ d dlmZmZmZmZ d dlmZ d d lmZ d dl m!Z! G d� de"� � Z#dS )� )�print_function)�division)�absolute_importN)�getpwuid)� iteritems)� get_param� replace_param)�UIConfig)�format_summary�parse_extensions�API_1)�ClSelect)�ClUserSelect�ClExtSelect�ClUserExtSelect�ClUserOptSelect)�BaseSelectorError)�ClSelectExcept)�get_main_username_by_uidc �� � e Zd ZdZdZdZdZdd�Zed� � � Z e j d� � � Z ed � � � Zed � � � Zd� Z d� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zdd�Zd� ZdS )� PhpManagerz:Responsible for actual PhpSelector selector high-level API�phpz6/usr/local/directadmin/plugins/phpselector/plugin.conf�activeNc �� � t j � � }|dk | _ t |� � | _ | j rt | j � � | _ d S t | j � � | _ d S )Nr ) �os�geteuid�is_root_userr � user_namer �interpreter� cl_select_libr )�self�cfg�pkg�euids �W/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectphp/php_manager.py�__init__zPhpManager.__init__% sf � ��z�|�|�� �A�I���1�$�7�7����� @�!)�$�*:�!;�!;�D����!-�d�.>�!?�!?�D���� c � � t j � � rt | j | j � � dk S t � � � dd� � S )zD Get current status for panel :return: bool �yes� hidePhpApp� uiSettings)�detect�is_dar �DA_PATH�DA_PARAMr �r! s r% �selector_enabledzPhpManager.selector_enabled. sI � � �<�>�>� H��T�\�4�=�9�9�U�B�B��z�z�+�+�L�,�G�G�G�Gr'