https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/pyami/installers/ubuntu/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/pyami/installers/ubuntu/__pycache__/installer.cpython-310.pyc
o

ckF[�
�@sVddlZddlZddlZddlZddlZddlZddlmZGdd�dejj	j
�Z
dS)�N)�getpwnamc@sJeZdZdZddd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)�	Installerz5
    Base Installer class for Ubuntu-based AMI's
    �*�rootNc


Cs�|dkrtt�d��}|dkrtt�d��}td|d�}
|	r1|	��D]
\}}|
�d||f�q#|
�d|||||||f�|
��dS)	z�
        Write a file to /etc/cron.d to schedule a command
            env is a dict containing environment variables you want to set in the file
            name will be used as the name of the file
        �random�<�z/etc/cron.d/%s�wz%s=%s
z%s %s %s %s %s %s %s
N)�strr�	randrange�open�items�write�close)
�self�name�command�minute�hour�mday�month�wday�who�env�fp�key�value�r�H/usr/lib/python3/dist-packages/boto/pyami/installers/ubuntu/installer.py�add_cron"szInstaller.add_croncCsVtj�d|�}t|d�}|�|�|��t�|tjtj	Btj
B�|�d|�dS)z7
        Add this file to the init.d directory
        z/etc/init.dr	z!/usr/sbin/update-rc.d %s defaultsN)�os�path�joinrrr�chmod�stat�S_IREAD�S_IWRITE�S_IEXEC�run)r�filer�f_path�frrr�add_init_script3s

zInstaller.add_init_scriptcCsbtj�d||f�tj�d�s|jdddd�tdd�}|�d||f�|�	�|tj
|<d	S)
z�
        Add an environemnt variable
        For Ubuntu, the best place is /etc/environment.  Values placed here do
        not need to be exported.
        zAdding env variable: %s=%sz/etc/environment.origz)cp /etc/environment /etc/environment.origF)�notify�
exit_on_errorz/etc/environment�az
%s="%s"N)�boto�log�infor r!�existsr(rrr�environ)rrrrrrr�add_env>s
zInstaller.add_envcC�|�d|�dS)Nz/etc/init.d/%s stop�r(�r�service_namerrr�stopL�zInstaller.stopcCr6)Nz/etc/init.d/%s startr7r8rrr�startOr;zInstaller.startcCs|�d|�t|�}|S)z3
        Create a user on the local system
        z
useradd -m %s)r(r)r�user�usrrrr�create_userRszInstaller.create_usercCst�)z>
        This is the only method you need to override
        )�NotImplementedError)rrrr�installZszInstaller.install)rrrrrrN)�__name__�
__module__�__qualname__�__doc__rr,r5r:r<r?rArrrrrs
r)�boto.pyami.installersr0r �os.pathr$r�pwdr�pyami�
installersrrrrr�<module>s

https://t.me/RX1948 - 2025