Mini Shell
�
�Kt�CK� �< � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ej � � ddl T ddl
Z
dd lmZ dd
l
mZmZmZ ddlmZ dZd
ZdZdZdZdZdZdZedz ez dz ez ZdZddiddiddiddid�Zd� Zd(d�Zd � Z d!� Z!d"� Z"d#� Z#d$� Z$d%� Z%d&� Z&d'� Z'dS ))zr
Now this package only cleans up old files and does not install new.
All new hooks must be installed using cllib.
� )�absolute_import)�division)�print_function)�unicode_literals)�standard_library)�*N)�print_error)� getCPName�
PLESK_NAME�DIRECTADMIN_NAME)�"remove_hook_by_str_id_and_locationz#USERDEL_CMD /usr/bin/userdel.cagefsz/usr/share/cagefs-plugins/hookszuser_create_post.shzuser_restore_post.shzuser_destroy_post.shz?/usr/share/cagefs-plugins/hooks/directadmin/user_create_post.shz@/usr/share/cagefs-plugins/hooks/directadmin/user_restore_post.shz@/usr/share/cagefs-plugins/hooks/directadmin/user_destroy_post.shz
/directadmin/�/z%/usr/share/cagefs-plugins/hooks/plesk�SCRIPT_FILEzcagefs_plesk_hs_created.shzcagefs_plesk_hs_updated.shzcagefs_plesk_hs_deleted.shzcagefs_plesk_dm_updated.sh)�phys_hosting_create�phys_hosting_update�phys_hosting_delete�
domain_updatec �v � t | d� � }|� � � }|� � � |S )N�r)�open� readlines�close)� file_name�f�contents �_/builddir/build/BUILDROOT/cagefs-7.6.19-1.el9.cloudlinux.x86_64/usr/share/cagefs/cagefshooks.py�get_file_contentr 3 s0 � ��Y����A��k�k�m�m�G��G�G�I�I�I��N� �wc � � d� |� � }t | |� � }|� |� � |� � � d S )N� )�joinr �writer )r r �open_methodr s r �write_file_contentr% ; sE � ��g�g�g���G��Y��$�$�A��G�G�G�����G�G�I�I�I�I�Ir c � � t dd� � } | � � � }| � � � d}d}d}|D ]c}|� d� � r|| }t dz ||<