관리-도구
편집 파일: clselectctlphp.cpython-37.pyc
B �v6d�� � @ s2 d dl mZ d dl mZ d dl mZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl Zd dlZd dl mZ ddlmZ ddlmZmZ dd lmZ dd lmZ ddlmZ ddlmZ d d lmZ d dlmZ d dlm Z d dl!m"Z"m#Z# d dl$m%Z%m&Z& d dl'm(Z( ddl)m*Z*m+Z+ ddl,m-Z-m.Z. d Z/dZ0dZ1dd� Z2dNdd�Z3dd� Z4dd� Z5dd� Z6d e/fd!d"�Z7d e/fd#d$�Z8d%d&� Z9d'd(� Z:d)d*� Z;d+d,� Z<d-d.� Z=d/d0� Z>dOd2d3�Z?dPd5d6�Z@dQd7d8�ZAd9d:� ZBd;d<� ZCd=d>� ZDd?d@� ZEdAdB� ZFdCdD� ZGdRdEdF�ZHdGdH� ZIdIdJ� ZJdKdL� ZKeLdMk�r.eK� dS )S� )�print_function)�absolute_import)�divisionN)�map� )�ClSelect)�ClExtSelect�depend_modules_dict)�ClUserSelect)�ClUserExtSelect)�ClUserOptSelect)�clprint)�ClPwd)�Feature)�is_panel_feature_supported)� SysCtlConf�SYSCTL_CL_CONF_FILE)�run_command�ExternalProgramFailed)� is_ubuntu)� in_cagefs�make_symlink)�ClSelectExcept�BaseClSelectExceptionz/usr/sbin/cagefsctlc C s� 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� 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�� t d*� t d+� t d,� t d-� t d.� t d/� t d0� t d1� t d2� d S )3Nz? -v | --version : Specify alternative versionz, -u | --user : UsernamezE -l | --list : List alternatives for interpreterzQ -G | --list-extensions : List global set of extensions for alternativez@ -S | --summary : List summary of alternativeszE -s | --user-summary : List user summary of alternativeszG -C | --current : Show currently selected alternativezR -c | --user-current : Show currently selected alternative for a userzE -B | --set-current : Set alternative as global defaultzC -b | --set-user-current : Set alternative as user defaultz? -Y | --enable-alternative : Enable alternative globallyz@ -N | --disable-alternative : Disable alternative globallyzd -E | --enable-extensions : Enable comma-separated list of extensions globally for a versionze -D | --disable-extensions : Disable comma-separated list of extensions globally for a versionz_ -R | --replace-extensions : Replace extensions with comma-separated list of extensions z: for a version globallyzX -e | --enable-user-extensions : Enable comma-separated list of extensions for a userzY -d | --disable-user-extensions : Disable comma-separated list of extensions for a userzc -r | --replace-user-extensions : Replace user extensions with comma-separated list of extensionsz[ -t | --reset-user-extensions : Replace user extensions with version default extensionszk -g | --list-user-extensions : List enabled extensions for a user. With key --all shows all extensionsz7 -a | --all : Show all extensionszf -p | --print-summary : If specified along with setting an alternative prints user summaryzb -V | --show-native-version : Shows native version while showing summary or selected versionzN -L | --list-users : List users who use a specified alternativezg -T | --change-to-version : Changes to a specified version all users who have a certain versionzO -k | --add-options : Add comma-separated list options for a userz] -m | --replace-options : Replace user options with comma-separated list of optionszR -x | --delete-options : Delete comma-separated list options for a userzY -Q | --base64 : Expects data as comma-separated base64-encoded stringzL -q | --quiet : Suppress errors messages for wrong inputzX -P | --print-options : Prints user options. By default prints as plain textzg --print-options-safe : Prints user options. By default prints as plain text (safe strings)zV --apply-symlinks-rules : Recreate symlinks to php extensions for all users zQ based on /etc/cl.selector/symlinks.rules filezk --exclude-pid-list : Specify list of PIDs of processes that should not be signaled by SIGHUPz6 -j | --json : Print data as JSONz5 -w | --csv : Print data as CSVz@ -W | --perl : Print data as perl structurezW --api-version : Integer, representing specific api version to use. z2 Defaults to {}ze -z | --reset-options : Deletes all user custom options. Range can be narrowed with user z6 or version optionsz< --update-backup : write settings to backupzh --apply-global-php-ini : use with 0, 1 or 2 arguments from the list: error_log, date.timezonezh without arguments applies all global php options including two abovezE --setup-without-cagefs : setup PHP Selector without CageFSzY --revert-to-cagefs : revert to default setup of PHP Selector (with CageFS)zV --for-all-users : applies specified action for all users in CageFS. zU Available only for enable/disable user extensions)�print�format�API_0� r r �H/opt/alt/python37/lib/python3.7/site-packages/clselect/clselectctlphp.py�usage2 sd r c C s2 d}|rd|df }t j�|| � t �d� dS )z5 Prints to stderr @param message: string z%s z%s:%s z%sr N)�sys�stderr�write�exit)�message�prefix�fmtr r r �print_error_and_exitg s r'