<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
        Copyright 2010 Marcelo Leal.
-->

<service_bundle type='manifest' name='ganglia'>
  <service
    name='network/ganglia'
    type='service'
    version='1'>
    <create_default_instance enabled='false' />
    <single_instance />
    <dependency name='net-loopback'
      grouping='require_all'
      restart_on='none'
      type='service'>
      <service_fmri value='svc:/network/loopback' />
    </dependency>

    <dependency name='net-physical'
      grouping='require_all'
      restart_on='none'
      type='service'>
      <service_fmri value='svc:/network/physical' />
    </dependency>

    <dependency name='config_data'
      grouping='require_all'
      restart_on='restart'
      type='path'>
      <service_fmri value='file://localhost/etc/ganglia/gmond.conf' />
    </dependency>

    <exec_method
      type='method'
      name='start'
      exec='/lib/svc/method/ganglia %m'
      timeout_seconds='30'>
    </exec_method>

    <exec_method
      type='method'
      name='restart'
      exec='/lib/svc/method/ganglia %m'
      timeout_seconds='30'>
    </exec_method>

    <exec_method
      type='method'
      name='stop'
      exec='/lib/svc/method/ganglia %m'
      timeout_seconds='30' >
    </exec_method>

    <template>
      <common_name>
        <loctext xml:lang='C'>
          Ganglia Gmond Service
        </loctext>
      </common_name>
    </template>
  </service>
</service_bundle>

