관리-도구
편집 파일: clselectctlruby.cpython-311.pyc
� %�4gYJ � �L � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl mZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZmZ ddlmZmZmZ d d lmZmZmZ d dlmZmZ dZ d� Z!d d�Z"d d�Z#d� Z$d!d�Z%d"d�Z&d� Z'd� Z(d� Z)d� Z*d� Z+d� Z,d d�Z-d� Z.d� Z/d� Z0dS )#� )�print_function)�absolute_import)�divisionN)� iteritems� )�clpassenger)�clselectctl)�utils)�clprint)�ClSelectExcept�BaseClSelectException)�environments� extensions�interpreters)�userdomains�docroot�CP_NAME)�NoDomain�NotSupported�rubyc � � t d� � t d� � t d� � t d� � t d� � t d� � t d� � t d� � t d � � t d � � t d� � t d� � t d � � t d� � t d� � t d� � t d� � t d� � t d� � t d� � t d� � t d� � d S )NzB -v | --version VERSION : Specify alternative versionz/ -u | --user USERNAME : UsernamezZ --domain DOMAIN : Domain (or subdomain); users main domain as defaultzH -l | --list : List alternatives for interpreterzB -G | --list-extensions : List global set of packageszC -K | --list-extensions-version : List version set of packageszC -s | --user-summary : List user summary of webappsz9 -y | --create-webapp : Create user webappz: -n | --destroy-webapp : Destroy user webappz] -f | --relocate-webapp : Change webapp directory (files must be moved manually)zA -F | --transit-webapp : Change webapp domain/aliasz5 -Z | --restart-webapp : Restart webappzZ -c | --user-current : Show currently selected alternative for user webappzM -b | --set-user-current : Set alternative as user webapp defaultz[ -e | --enable-user-extensions GEMS : Install comma-separated list of gems for user webappz] -d | --disable-user-extensions GEMS : Uninstall comma-separated list of gems for user webappzC : Use '-' (minus) for all gemszZ -r | --replace-user-extensions GEMS : Update comma-separated list of gems for user webappzJ -g | --list-user-extensions : List installed gems for user webappzi -p | --print-summary : If specified along with setting an alternative prints user summaryz9 -j | --json : Print data as JSON)�print� � �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectctlruby.py�usager sR � � � N�O�O�O� � ;�<�<�<� � f�g�g�g� � T�U�U�U� � N�O�O�O� � O�P�P�P� � O�P�P�P� � E�F�F�F� � F�G�G�G� � i�j�j�j� � M�N�N�N� � A�B�B�B� � f�g�g�g� � Y�Z�Z�Z� � g�h�h�h� � i�j�j�j� � O�P�P�P� � f�g�g�g� � O�P�P�P� � V�W�W�W� � u�v�v�v� � E�F�F�F�F�Fr c �* � t | |� � }|s|}t j || |� � }|� � � sT t j d�� � | }n"# t $ r t j |� � �w xY w|� |� � |S )N�version)�key) �_get_prefixr �Environment�existsr �KeyErrorr �NoSuchAlternativeVersion�create)�user� directoryr �env_name�prefix�environment�interpreters r �_create_environmentr, 8 s� � � ��y� )� )�F�� ����*�8�T�6�B�B�K������ (� C�&�3� �B�B�B�7�K�K�K��� C� C� C� �9�'�B�B�B� C�������;�'�'�'��s � A �A;c � � t | |� � }|�Bt j | � � }|� |� � }|st j d|z � � �|d }t j � t j � t j � |� � � � � � }t j || |� � }|S )N�8No such application (or application not configured) "%s"�binary)r r �summary�getr �NoSuchApplication�os�path�basename�dirnamer r! )r&