<?xml version="1.0"?><!-- $CVSHeader$ -->
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
 This XML file is used for stopping and starting trafficserver using the
 Solaris Service Management Facility.  See solaris.txt for more information

  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

-->

<service_bundle type='manifest' name='apache:trafficserver'>

<service
	name='application/apache/trafficserver'
	type='service'
	version='1'>

	<create_default_instance enabled='false' />

	<!--
	  Wait for network interfaces to be initialized.
	-->
	<dependency name='network'
		grouping='require_all'
		restart_on='none'
		type='service'>
		<service_fmri value='svc:/milestone/network:default'/>
	</dependency>

	<!--
	  Wait for all local filesystems to be mounted.
	-->
	<dependency name='filesystem-local'
	    grouping='require_all'
	    restart_on='none'
	    type='service'>
	    <service_fmri
		value='svc:/system/filesystem/local:default'/>
	</dependency>

	<dependent
		name='apache-trafficserver-user-server'
		grouping='optional_all'
		restart_on='none'>
			<service_fmri
			    value='svc:/milestone/multi-user-server' />
	</dependent>

	<exec_method
		type='method'
		name='start'
		exec='@exp_bindir@/traffic_cop 2>&amp;1 &amp;'
		timeout_seconds='120' />

	<exec_method
		type='method'
		name='stop'
		exec=':kill'
		timeout_seconds='120' />

	<property_group name='cmd_opts' type='application'>
		<stability value='Evolving' />
	</property_group>

	<property_group name='startd' type='framework'>
		<!-- sub-process core dumps shouldn't restart
			session -->
		<propval name='ignore_error' type='astring'
			value='core,signal' />
	</property_group>

	<stability value='Evolving' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
				Apache Traffic Server
			</loctext>
		</common_name>
		<documentation>
			<doc_link name='trafficserver.apache.org'
				uri='http://trafficserver.apache.org/docs' />
		</documentation>
	</template>
</service>

</service_bundle>
