o
    O6uf!  ã                   @   s*   d dl mZmZmZ G dd„ deeƒZdS )é    )ÚPluginÚIndependentPluginÚ	PluginOptc                   @   s4   e Zd ZdZdZdZdZedddd�gZd	d
„ Z	dS )ÚNginxznginx http daemonÚnginx)Ú	webserver)r   ÚlogFzcollect all nginx logs)ÚdefaultÚdescc                 C   s^   |   ddg¡ |  g d¢¡ g d¢}|  dd„ |D ƒ¡ |  d¡s&|  d¡r-|  d	¡ d S d S )
Nznginx -Vznginx -T)z/etc/nginx/*z/var/log/nginx/access.logz/var/log/nginx/error.log)ÚautomationcontrollerÚautomationhubÚautomationedacontrollerc                 S   s   g | ]}d |› d�‘qS )z/var/log/nginx/Ú*© )Ú.0Úaltr   r   ú:/usr/lib/python3/dist-packages/sos/report/plugins/nginx.pyÚ
<listcomp>,   s    ÿzNginx.setup.<locals>.<listcomp>r   Úall_logsz/var/log/nginx/*)Úadd_cmd_outputÚadd_copy_specÚadd_forbidden_pathÚ
get_option)ÚselfÚaltconfr   r   r   Úsetup   s   þ
ÿÿzNginx.setupN)
Ú__name__Ú
__module__Ú__qualname__Ú
short_descÚplugin_nameÚprofilesÚpackagesr   Úoption_listr   r   r   r   r   r      s    ÿr   N)Úsos.report.pluginsr   r   r   r   r   r   r   r   Ú<module>   s   