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

    Cherokee

    Authors:
         Rodrigo Fernandez-Vizarra <rodrigo.fernandez-vizarra@sun.com>

    Copyright (C) 2001-2014 Alvaro Lopez Ortega

    This program is free software; you can redistribute it and/or
    modify it under the terms of version 2 of the GNU General Public
    License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    USA
-->

<service_bundle type='manifest' name='cherokee'>
  <service name='network/http' type='service' version='1'>


    <!--
	Cherokee is an instance of the network/http service, it
	is not enabled by default.
    -->
    <instance name='cherokee' enabled='false'>


      <!--
	  Cherokee dependencies
      -->
      <dependency name='loopback'
		  grouping='require_all'
		  restart_on='error'
		  type='service'>

	<service_fmri value='svc:/network/loopback:default'/>

      </dependency>

      <dependency name='physical'
		  grouping='optional_all'
		  restart_on='error'
		  type='service'>
	<service_fmri value='svc:/network/physical:default'/>
      </dependency>


      <!--
	  start method
      -->
      <exec_method type='method'
		   name='start'
		   exec='%prefix%/sbin/cherokee -d'
		   timeout_seconds='60'>
	<method_context>
	  <method_credential user='root' group='root' />
	</method_context>
      </exec_method>


      <!--
	  stop method
      -->
      <exec_method type='method'
		   name='stop'
		   exec='kill `cat %localstatedir%/run/cherokee.pid`'
		   timeout_seconds='60'>
	<method_context>
	  <method_credential user='root' group='root' />
	</method_context>
      </exec_method>


      <!--
	  resstart method
      -->
      <exec_method type='method'
		   name='refresh'
		   exec='kill -HUP `cat %localstatedir%/run/cherokee.pid`'
		   timeout_seconds='60'>
	<method_context>
	  <method_credential user='root' group='root' />
	</method_context>
      </exec_method>

      <property_group name='startd' type='framework'>
	<propval name='duration' type='astring' value='contract'/>
	<propval name='ignore_error' type='astring' value='core,signal' />
      </property_group>

    </instance>

    <!--
	Describe the service
    -->
    <template>
      <common_name>
	<loctext xml:lang='C'>
	  A flexible, very fast, lightweight Web server.
	</loctext>
	<loctext xml:lang='es'>
	  Un servidor web, ligero, flexible y muy rapido.
	</loctext>
      </common_name>
      <documentation>
	<doc_link name='www.cherokee-project.com' uri='http://www.cherokee-project.com/doc' />
      </documentation>
    </template>
  </service>
</service_bundle>
