lighttpd_freebsd:

  template: handlers-auto2.yml.j2
  handlers:

    - handler: enable and start lighttpd
      module: service
      params:
        - 'name: lighttpd'
        - 'state: started'
        - 'enabled: true'

    - handler: disable and stop lighttpd
      module: service
      params:
        - 'name: lighttpd'
        - 'state: stopped'
        - 'enabled: false'

    - handler: reload lighttpd
      module: service
      params:
        - 'name: lighttpd'
        - 'state: reloaded'
      conditions:
        - '- cl_service_lighttpd_enable|bool'

    - handler: restart lighttpd
      module: service
      params:
        - 'name: lighttpd'
        - 'state: restarted'
      conditions:
        - '- cl_service_lighttpd_enable|bool'

    - handler: lighttpd check
      module: command
      params:
        - 'cmd: /usr/local/sbin/lighttpd -t'
