403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.143.223.72
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/clwizard/modules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/clwizard/modules/__pycache__/ruby.cpython-311.pyc
�

T�g����ddlZddlmZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZGd
�de��ZdS)�N)�Feature)�ExternalProgramFailed�get_passenger_package_name�is_litespeed_running)�
get_ui_config)�MODULES_LOGS_DIR)�InstallationFailedException)�installed_interpreters_list�)�WizardInstallerc��eZdZej�ed��Zej	Z
d�Zd�Zd�Z
d�Zd�Zed���ZdS)	�
RubyInstallerzruby.logc�$�g}|D]0}d|�dd��z}|�|���1|j�dd�|����	|j|�dS#t$r}t��|�d}~wwxYw)Nzalt-ruby�.�z-Try to install Ruby package with versions: %s�,)�replace�append�
app_logger�info�join�_install_groupsrr	)�self�versions�groups�v�package_name�es      �L/opt/cloudlinux/venv/lib64/python3.11/site-packages/clwizard/modules/ruby.py�_install_ruby_versionsz$RubyInstaller._install_ruby_versionss������	(�	(�A�%��	�	�#�r�(:�(:�:�L��M�M�,�'�'�'�'�����L�c�h�h�W_�N`�N`�a�a�a�	7� �D� �&�)�)�)�)��$�	7�	7�	7�-�/�/�Q�6�����	7���s�%
A1�1
B�;B
�
Bc��d}tj�|��sdS	|�d|g��dS#t$r}t��|�d}~wwxYw)a
        In order to make ruby apps work on Litespeed server, we need to run an
        extra script

        See docs for details:
        https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cloudlinux:enable_passenger
        :return:
        z9/usr/local/lsws/admin/misc/enable_ruby_python_selector.shN�sh)�os�path�isfile�_run_commandrr	)r�litespeed_scriptrs   r�_configure_for_litespeed_serverz-RubyInstaller._configure_for_litespeed_server#s{��W���w�~�~�.�/�/�	��F�	7����t�%5�6�7�7�7�7�7��$�	7�	7�	7�-�/�/�Q�6�����	7���s�>�
A�A�Ac���|�t����}t��p5t���di���d��}|o|S)a�
        Check that the Ruby Selector is ready to work

        All configurations were done and Passenger is installed
        We always have at least one ruby package installed, because it's a
        dependency of the Passenger package, so we can skip that check
        If the config file does not exist, we ignore the uiSettings
        :return: already_configured status
        :rtype: bool
        �
uiSettings�hideRubyApp)�_is_package_installedrr�get)r�passenger_installed�
configs_oks   r�_is_already_configuredz$RubyInstaller._is_already_configured6sb��#�8�8�9S�9U�9U�V�V��&���(�h�
���0C�0C�L�RT�0U�0U�0Y�0Y�Zg�0h�0h�,h�
�"�1�z�1�c���g}td��}|D]#}|jr|�|j���$|���||�d��d�d�S)N�ruby)�installed_versions�available_versions)�already_configured�options)r
�	installedr�versionr0�_get_available_versions)r�installed_ruby_versions�interpreters_list�interpreters    r�initial_statuszRubyInstaller.initial_statusEs���"$��7��?�?��,�	D�	D�K��$�
D�'�.�.�{�/B�C�C�C��"&�"=�"=�"?�"?�&=�&*�&B�&B�6�&J�&J���
�
�	
r1c�:�|�dg��}|���|�|��t��r|���	|�gd���dS#t$r}t��|�d}~wwxYw)Nr)zcloudlinux-config�setz--jsonz:--data={"options": {"uiSettings": {"hideRubyApp": false}}})r-�_install_passengerr rr(r&rr	)rr7�install_versionsrs    r�run_installationzRubyInstaller.run_installationSs���"�;�;�z�2�6�6�����!�!�!��#�#�$4�5�5�5��!�!�	3��0�0�2�2�2�
	7�������
�
�
�
�
��%�	7�	7�	7�-�/�/�Q�6�����	7���s�#A<�<
B�B�Bc��dhS)Nr�)�clss r�supported_optionszRubyInstaller.supported_optionsgs
���|�r1N)�__name__�
__module__�__qualname__r#r$rr�LOG_FILEr�
RUBY_SELECTOR�_REQUIRED_CL_COMPONENT_SUPPORTr r(r0r>rC�classmethodrGrEr1rrrs��������w�|�|�,�j�9�9�H�%,�%:�"�	7�	7�	7�7�7�7�&
2�
2�
2�
�
�
�7�7�7�(����[���r1r)r#�clcommon.constr�clcommon.utilsrrr�clconfig.ui_config_libr�clwizard.constantsr�clwizard.exceptionsr	�clwizard.utilsr
�baserrrEr1r�<module>rVs���
�	�	�	�"�"�"�"�"�"�b�b�b�b�b�b�b�b�b�b�0�0�0�0�0�0�/�/�/�/�/�/�;�;�;�;�;�;�6�6�6�6�6�6�!�!�!�!�!�!�U�U�U�U�U�O�U�U�U�U�Ur1

Youez - 2016 - github.com/yon3zu
LinuXploit