Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Assign NameStore Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Assign NameStore NameLoad For NameStore NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad Break FunctionDef arguments args defaults body Assign NameStore Call NameLoad TupleLoad Str Str Str Return Call NameLoad GeneratorExp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Raise Call NameLoad Str Return Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call SubscriptLoad NameLoad Index Str Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call SubscriptLoad NameLoad Index Str Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str If BoolOpAnd Call NameLoad NameLoad Call NameLoad NameLoad body Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str NameLoad attr Num handlers ExceptHandler type NameLoad body Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareIn NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareNotIn NameLoad Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If UnaryOpNot NameLoad body Raise Call NameLoad Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str If UnaryOpNot Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str Return BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return UnaryOpNot Call NameLoad NameLoad decorator_list
N/A N/A 
daemontools service module. This module will create daemontools type
service watcher.

This module is compatible with the :mod:`service <salt.states.service>` states,
so it can be used to maintain services using the ``provider`` argument:

.. code-block:: yaml

    myservice:
      service.running:
        - provider: daemontools
 __future__ absolute_import N/A logging N/A os N/A os.path N/A re N/A salt.utils salt.exceptions CommandExecutionError N/A __func_alias__ N/A reload_ reload N/A log N/A N/A logging getLogger __name__ N/A VALID_SERVICE_DIRS N/A /service /var/service /etc/service N/A SERVICE_DIR None N/A service_dir VALID_SERVICE_DIRS N/A N/A N/A N/A N/A os path exists service_dir N/A N/A SERVICE_DIR service_dir N/A __virtual__ N/A N/A N/A N/A N/A BINS N/A frozenset N/A svc supervise svok N/A N/A all N/A N/A N/A N/A salt utils which b N/A b BINS N/A _service_path N/A N/A name N/A N/A N/A 
    build service path
     N/A N/A SERVICE_DIR N/A N/A N/A CommandExecutionError Could not find service directory. N/A N/A N/A {0}/{1} format SERVICE_DIR name N/A start N/A N/A name N/A N/A N/A 
    Starts service via daemontools

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.start <service name>
     N/A N/A N/A __salt__ N/A file.remove N/A N/A {0}/down format N/A _service_path name N/A cmd N/A N/A svc -u {0} format N/A _service_path name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A stop N/A N/A name N/A N/A N/A 
    Stops service via daemontools

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.stop <service name>
     N/A N/A N/A __salt__ N/A file.touch N/A N/A {0}/down format N/A _service_path name N/A cmd N/A N/A svc -d {0} format N/A _service_path name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A term N/A N/A name N/A N/A N/A 
    Send a TERM to service via daemontools

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.term <service name>
     N/A cmd N/A N/A svc -t {0} format N/A _service_path name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A reload_ N/A N/A name N/A N/A N/A 
    Wrapper for term()

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.reload <service name>
     N/A N/A term name N/A restart N/A N/A name N/A N/A N/A 
    Restart service via daemontools. This will stop/start service

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.restart <service name>
     N/A ret restart False N/A N/A N/A stop name N/A start name N/A N/A ret restart True N/A ret N/A full_restart N/A N/A name N/A N/A N/A 
    Calls daemontools.restart() function

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.full_restart <service name>
     N/A N/A restart name N/A status N/A N/A name sig N/A None N/A N/A 
    Return the status for a service via daemontools, return pid if running

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.status <service name>
     N/A cmd N/A N/A svstat {0} format N/A _service_path name N/A out N/A N/A __salt__ N/A cmd.run_stdout cmd python_shell False N/A N/A N/A pid N/A N/A N/A N/A re search \(pid (\d+)\) out group 1 N/A N/A N/A AttributeError N/A N/A pid N/A pid N/A available N/A N/A name N/A N/A N/A 
    Returns ``True`` if the specified service is available, otherwise returns
    ``False``.

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.available foo
     N/A N/A name N/A get_all N/A missing N/A N/A name N/A N/A N/A 
    The inverse of daemontools.available.
    Returns ``True`` if the specified service is not available, otherwise returns
    ``False``.

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.missing foo
     N/A N/A name N/A get_all N/A get_all N/A N/A N/A N/A N/A 
    Return a list of all available services

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.get_all
     N/A N/A SERVICE_DIR N/A N/A N/A CommandExecutionError Could not find service directory. N/A N/A sorted N/A N/A os listdir SERVICE_DIR N/A enabled N/A N/A name N/A kwargs N/A N/A 
    Return True if the named service is enabled, false otherwise
    A service is considered enabled if in your service directory:
    - an executable ./run file exist
    - a file named "down" does not exist

    .. versionadded:: 2015.5.7

    name
        Service name

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.enabled <service name>
     N/A N/A N/A available name N/A N/A N/A N/A log error N/A N/A Service {0} not found format name N/A False N/A run_file N/A N/A N/A os path join SERVICE_DIR name run N/A down_file N/A N/A N/A os path join SERVICE_DIR name down N/A N/A N/A N/A N/A os path isfile run_file N/A N/A os access run_file N/A os X_OK N/A N/A N/A N/A os path isfile down_file N/A disabled N/A N/A name N/A N/A N/A 
    Return True if the named service is enabled, false otherwise

    .. versionadded:: 2015.5.6

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.disabled <service name>
     N/A N/A N/A enabled name N/A