首页 > 其他 > 详细

SaltStack源码分析之service状态模块

时间:2015-05-13 19:57:42      阅读:303      评论:0      收藏:0      [点我收藏+]


/usr/lib/python2.6/site-packages/salt/states/service.py

这个模块用于启动或重启服务和后台进程

starting or restarting of services and daemons
==============================================

Services are defined as system daemons typically started with system init or
rc scripts, services can be defined as running or dead.

.. code-block:: yaml

    httpd:
      service:
        - running

The service can also be set to be started at runtime via the enable option:

.. code-block:: yaml

    openvpn:
      service:
        - running
        - enable: True

By default if a service is triggered to refresh due to a watch statement the
service is by default restarted. If the desired behavior is to reload the
service, then set the reload value to True:

.. code-block:: yaml

    redis:
      service:
        - running
        - enable: True
        - reload: True
        - watch:
          - pkg: redis

.. note::

    More details regarding ``watch`` can be found in the
    :doc:`Requisites </ref/states/requisites>` documentation.

‘‘‘


主要使用到两个状态running和dead








本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1651039

SaltStack源码分析之service状态模块

原文:http://john88wang.blog.51cto.com/2165294/1651039

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!