<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
	 Bruno Bonfils, <asyd@asyd.net>
	 April 2006
    Use is subject to CDDL license terms.
-->

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

<service
	name='application/postgresql'
	type='service'
	version='1'>

	<instance name='default' enabled='false'>
		<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>

		<exec_method
			type='method'
			name='start'
			exec='/lib/svc/method/postgresql start'
			timeout_seconds='60'>
                  <method_context>
                           <method_credential user='pgsql' group='pgsql' />
                   </method_context>
		</exec_method>

		<exec_method
			type='method'
			name='stop'
			exec='/lib/svc/method/postgresql stop'
			timeout_seconds='60'>
                  <method_context>
                           <method_credential user='pgsql' group='pgsql' />
                   </method_context>
		</exec_method>

		<exec_method
			type='method'
			name='refresh'
			exec='/lib/svc/method/postgresql refresh'
			timeout_seconds='60'>
                  <method_context>
                           <method_credential user='pgsql' group='pgsql' />
                   </method_context>
		</exec_method>

		<property_group name='postgresql' type='application'>
			<stability value='Evolving' />
			<propval name='options' type='astring' value='' />
			<propval name='pgdata' type='astring' value='/var/db/pgsql/base' />
			<propval name='config' type='astring' value='/var/db/pgsql/base/postgresql.conf' />
		</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>

	</instance>

	<stability value='Evolving' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
				Postgresql
			</loctext>
		</common_name>
		<documentation>
			<manpage title='postmaster' section='1M' />
			<doc_link name='postgresql'
				uri='http://www.postgresql.org/' />
		</documentation>
	</template>
</service>

</service_bundle>
