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

<!--
	Copyright (c) 2016 Nagios(R) Core(TM) Development Team
-->

<service_bundle type='manifest' name='NGOS:ndo2db'>

	<service
		name='network/nagios/ndo2db'
		type='service'
		version='1'>

		<restarter>
			<service_fmri value='svc:/network/inetd:default' />
		</restarter>

		<dependency name='config_data'
			grouping='require_all'
			restart_on='restart'
			type='path'>
			<service_fmri
			    value='file://localhost@sysconfdir@/ndo2db.cfg' />
		</dependency>

		<exec_method
			type='method'
			name='inetd_start'
			exec='@sbindir@/ndo2db -c @pkgsysconfdir@/ndo2db.cfg -i'
			timeout_seconds='0'>
			<method_context>
				<method_credential user='@ndo2db_user@' group='@ndo2db_group@'/>
			</method_context>
		</exec_method>

		<exec_method
			type='method'
			name='inetd_offline'
			exec=':kill_process'
			timeout_seconds='0'/>

		<exec_method
			type='method'
			name='inetd_disable'
			exec=':kill'
			timeout_seconds='0'/>

		<property_group name='inetd' type='framework'>
			<stability value='Evolving' />
			<propval name='name' type='astring' value='ndo2db' />
			<propval name='endpoint_type' type='astring' value='stream' />
			<propval name='proto' type='astring' value='tcp' />
			<propval name='wait' type='boolean' value='false' />
			<propval name='isrpc' type='boolean' value='false' />
		</property_group>

		<property_group name='general' type='framework'>
			<propval name='enabled'
				type='boolean'
				value='false'/>
			<propval name='action_authorization'
				type='astring'
				value='solaris.smf.manage.ndo2db'/>
			<propval name='value_authorization'
				type='astring'
				value='solaris.smf.manage.ndo2db'/>
		</property_group>

		<instance name='default' enabled='false' />

		<stability value='Unstable' />

		<template>
			<common_name>
				<loctext xml:lang="C">NDO2DB daemon</loctext>
			</common_name>
			<description>
				<loctext xml:lang="C">
					Nagios Data Out Daemon
				</loctext>
			</description>
			<documentation>
				<doc_link name='nagios.org' uri='http://www.nagios.org' />
			</documentation>
		</template>

	</service>

</service_bundle>
