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

<service_bundle type='manifest' name='OZSWopenssh:sshd'>

<service
    name='ozone/sshd'
    type='service'
    version='1'>

    <create_default_instance enabled='false' />
    <single_instance />

    <dependency name='fs-local'
        grouping='require_all' restart_on='none' type='service'>
        <service_fmri value='svc:/system/filesystem/local' />
    </dependency>

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

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

    <dependency name='cryptosvc'
        grouping='require_all' restart_on='none' type='service'>
        <service_fmri value='svc:/system/cryptosvc' />
    </dependency>

    <dependency name='utmp'
        grouping='require_all' restart_on='none' type='service'>
        <service_fmri value='svc:/system/utmp' />
    </dependency>

    <dependency name='config_data'
        grouping='require_all' restart_on='restart' type='path'>
        <service_fmri value='file://localhost/etc/opt/ozsw/openssh/sshd_config' />
    </dependency>

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

    <exec_method
        type='method' name='start'
        exec='/lib/svc/method/ozone-sshd start'
        timeout_seconds='60' />

    <exec_method
        type='method' name='stop'
        exec='/lib/svc/method/ozone-sshd stop'
        timeout_seconds='60' />

    <exec_method
        type='method' name='refresh'
        exec='/lib/svc/method/ozone-sshd refresh'
        timeout_seconds='60' />

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

    <property_group name='general' type='framework'>
        <propval name='action_authorization' type='astring'
            value='solaris.smf.manage.ozone.sshd' />
    </property_group>

    <stability value='Unstable' />

    <template>
        <common_name>
            <loctext xml:lang='C'>OZSW OpenSSH server</loctext>
        </common_name>
        <documentation>
            <manpage title='sshd' section='8'
                manpath='/opt/ozsw/share/man' />
        </documentation>
    </template>

</service>

</service_bundle>
