Server IP : 184.154.167.98 / Your IP : 3.15.182.217 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/cagefs/__pycache__/ |
Upload File : |
� ��cg�% � � � d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ ej � � d dlT d dl Z d dl Z d dlZd dlZd dl Z d dlZd dlZd dlmZmZmZmZmZmZ d d lmZ d d lmZ d dlmZ d� Zd � Zd� Z dd�Z!dS )� )�absolute_import)�division)�print_function)�unicode_literals)�standard_library)�*N)�get_list_of_users�cagefs_is_enabled�save_dir_exists�get_exclude_user_list�get_min_uid�MIN_UID)� read_file)�ispmanager_create_user_wrapper)�mod_makedirsc �� � t j � � t j � � sdS t j � d� � �rddg} t j | dd�� � � d� � }|D ]�}|� d� � d k r�t |� d � � d � dd� � � � � � � }| � d |z ddddg� � t j | dd�� � ��dS # t $ r-}t j dt |� � � � Y d}~dS d}~ww xY wt j � � �rx d}t# � � }g d�} t j | dd�� � � d� � }|D ]|}|� d� � re|� � � � d� � }t% |� � dk r�R|d � d� � }|D ] }d|v rd} n� n�}|sud� |� � dz dz } | � � � } | � d| z dg� � t j | dd�� � � d� � dS dS # t t( f$ r-}t j dt |� � � � Y d}~dS d}~ww xY wdS )zF Install exclude .cagefs folder from backup :return: None N�4z/usr/local/ispmgr/sbin/mgrctl� backupplanF)�check_return_code� exit_on_error� zid=���zname=r � z.content.edit plid=zsok=okztype=excludezmodule=filezfiledata=.cagefsz+Failed to set exclude dir for ISPManager 4:)z/usr/local/mgr5/sbin/mgrctlz-m�ispmgrzbackup2.settings� exclude_files�=� � � z.cagefsTzdata/.cagefszexclude_files=%sz+Failed to set exclude dir for ISPManager 5:)�detect�getCP� is_ispmanager� CP_VERSION� startswith� cagefslib�Execute�split�find�str�replace�strip�extend�OSError�secureio�print_error�ispmanager5_is_master�list�len�join�IOError) �isp_command_list�result�line�plan_id�e�cagefs_exclude_is_found�exclude_files_list�l_parts�exclude_file�add_lines �i/builddir/build/BUILDROOT/cagefs-7.6.23-1.el8.cloudlinux.x86_64/usr/share/cagefs/cagefs_ispmanager_lib.py�$install_ispmanager_directory_excluder@ >