Server IP : 192.158.238.246 / Your IP : 18.219.65.132 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/clconfigure/__pycache__/ |
Upload File : |
� _{�g) � �r � d dl Z d dlmZmZ dZdZdZdZdZdZ d Z d ZdZdd �Z ed� � d� � � ZdS )� N)�task�run�masked�stopped�unmasked�running�failed�inactive�active�enabled�disabled� is-activec �b � t d|| dz g� � }|j � � � }|S )zZ Get information about systemctl service state (either activity or enability) � systemctl�.service)r �stdout�strip)�service�kind�result�states �py/clconfigure/services.py�get_service_stater s5 � � �+�t�W�z�%9�:� ;� ;�F��M���!�!�E��L� z<Changing service '{service_name}' state to '{desired_state}'c �h � t |d�� � }t |� � }t j d|||� � d}| t k r|t k rd}n|| t k r|t k rd}nc| t k r|t k rd}nJ| t k r|t k rd}n1| t k r|t k rd }n| t k r |t k rd }|�t j d|� � dS t d||d z g� � t |� � }t |� � }t j d|||� � dS )zi Brings service to given state. May be executed more that once, does't crash on future calls z is-enabled)r zDChecking service '%s' state... package is in state='%s' running='%s'N�mask�unmask�stop�disable�start�enablez"No actions needed for service '%s'r r zNChecking service '%s' state again... service now is in state='%s' running='%s')r �logging�debug�STATE_MASKED�STATE_UNMASKED� STATE_STOPPED�STATUS_STOPPED�STATE_DISABLED� STATE_RUNNING�STATUS_RUNNING� STATE_ENABLEDr )� desired_state�service_name� current_state�current_status�actions r �set_service_stater1 # st � � &�l��F�F�F�M�&�|�4�4�N��M� �"�M�>�C� C� C� �F���$�$��,�)F�)F���� �.� (� (�]�l�-J�-J���� �-� '� '�N�n�,L�,L���� �.� (� (�]�n�-L�-L���� �-� '� '�N�n�,L�,L���� �-� '� '�M�]�,J�,J��� �~�� �:�L�I�I�I�I�I��[�&�,��";�<�=�=�=�)�,�7�7� �*�<�8�8��� � �&� �~� G� G� G� G� Gr )r )r"