On Thu, 28 Oct 2010, Frank Pittel wrote:
;
; One last question. Does anyone have any smf methods for "master" and 
"saslauthd"?

Here's a manifest that we use for master and sync client. It creates two
services:

# svcs cyrus
STATE          STIME    FMRI
online         Oct_13   svc:/network/cyrus:server
online         Oct_13   svc:/network/cyrus:sync

We keep the sync client separate so that we can control it without
affecting the main server.

As attached, it assumes the server is installed in /opt/cyrus and the data
is in /data/cyrus so you may have to change them.

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

<service_bundle type='manifest' name='cyrus:master'>

<service
        name='network/cyrus'
        type='service'
        version='1'>

        <dependency name='paths'
            grouping='require_all'
            restart_on='error'
            type='path'>
                <service_fmri value='file://localhost/opt/cyrus/etc/cyrus.conf' 
/>
                <service_fmri 
value='file://localhost/data/cyrus/config/mailboxes.db' />
        </dependency>

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

        <dependency name='network'
                grouping='optional_all'
                restart_on='error'
                type='service'>
                <service_fmri value='svc:/milestone/network' />
        </dependency>

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

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

                <exec_method
                    type='method'
                    name='start'
                    exec='/opt/cyrus/bin/master -d'
                    timeout_seconds='60' >
                </exec_method>

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

                <template>
                        <common_name>
                                <loctext xml:lang='C'>
                                Cyrus IMAP Server
                                </loctext>
                        </common_name>
                </template>
        </instance>

        <instance name='sync' enabled='false'>
                <dependent name='cyrussync_multi-user'
                        grouping='optional_all'
                        restart_on='none'>
                        <service_fmri value='svc:/milestone/multi-user' />
                </dependent>

                <exec_method
                    type='method'
                    name='start'
                    exec='/opt/cyrus/bin/sync_client -r -o'
                    timeout_seconds='60' >
                </exec_method>

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

                <template>
                        <common_name>
                                <loctext xml:lang='C'>
                                Cyrus IMAP Sync Client
                                </loctext>
                        </common_name>
                </template>
        </instance>

</service>

</service_bundle>
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/

Reply via email to