<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
	Put this in /var/svc/manifest/network
	Derek Crudgington, dacrud@gmail.com
	http://hell.jedicoder.net
-->

<service_bundle type='manifest' name='fetchmail:default'>

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

	<create_default_instance enabled='false' />

	<single_instance />

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

	<dependency
	    name='loopback'
	    grouping='require_all'
	    restart_on='restart'
	    type='service'>
		<service_fmri value='svc:/network/loopback' />
	</dependency>

	<exec_method
		type='method'
		name='stop'
		exec='pkill fetchmail'
		timeout_seconds='60' >
	</exec_method>

	<exec_method
		type='method'
		name='start'
		exec='/usr/local/bin/fetchmail -s --daemon 120 -K'
		timeout_seconds='30' >
	</exec_method>

        <exec_method
                type='method'
                name='refresh'
                exec='pkill -HUP fetchmail'
                timeout_seconds='30' >
        </exec_method>


	<property_group
		name='startd'
		type='framework'>
		<propval name='duration' type='astring' value='transient' />
	</property_group>

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>Fetchmail</loctext>
		</common_name>
		<description>
			<loctext xml:lang='C'>
			snmpd
			</loctext>
		</description>
		<documentation>
			<manpage title='fetchmail' section='5'
				manpath='/usr/local/man' />
		</documentation>
	</template>
</service>

</service_bundle>
