Got cyrus to compile but now it's not working.

Gary Mills mills at cc.umanitoba.ca
Fri Oct 29 08:13:06 EDT 2010


On Thu, Oct 28, 2010 at 01:43:37PM -0500, Frank Pittel wrote:
> 
> One last question. Does anyone have any smf methods for "master" and
> "saslauthd"?

Attached are the ones I'm using.  They install in /var/svc/manifest/site
and /lib/svc/method/site .

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-
-------------- next part --------------
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='sasl-authd'>
  <service name='site/sasl-authd' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>
    <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
        <service_fmri value='file://localhost/etc/sasl.conf'/>
    </dependency>
    <dependency name='local' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/local'/>
    </dependency>
    <dependency name='log' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/system-log'/>
    </dependency>
    <dependent name='sasl_multi-user' restart_on='none' grouping='optional_all'>
      <service_fmri value='svc:/milestone/multi-user'/>
    </dependent>
    <exec_method name='start' type='method' exec='/lib/svc/method/site/sasl-authd' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='root'/>
      </method_context>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='root'/>
      </method_context>
    </exec_method>
    <property_group name='startd' type='framework'>
      <propval name='ignore_error' type='astring' value='core,signal'/>
    </property_group>
    <stability value='Unstable'/>
    <template>
      <common_name>
        <loctext xml:lang='C'>SASL Authentication Server</loctext>
      </common_name>
    </template>
  </service>
</service_bundle>
-------------- next part --------------
#!/sbin/sh
#
# Start method script for the sasl authentication server
#

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin; export PATH
SASLAUTHDDIR=/var/run/saslauthd

. /lib/svc/share/smf_include.sh

if /usr/bin/pgrep -x -U 0 -z `/sbin/zonename` saslauthd >/dev/null 2>&1; then
	echo "$0: saslauthd is already running"
	exit $SMF_EXIT_ERR_NOSMF
fi

if [ ! -d $SASLAUTHDDIR ]; then
    mkdir $SASLAUTHDDIR
    chown cyrus $SASLAUTHDDIR
    chmod 700 $SASLAUTHDDIR
fi

echo "starting saslauthd"
saslauthd -a pam -c -n 40 -t 1800; echo "started saslauthd"
sleep 2
exit $SMF_EXIT_OK

#!/end
-------------- next part --------------
<?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='site/cyrus-master' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>
    <dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
        <service_fmri value='file://localhost/etc/cyrus.conf'/>
    </dependency>
    <dependency name='stat-file' grouping='require_all' restart_on='none' type='path'>
        <service_fmri value='file://localhost/imap/conf/.stat'/>
    </dependency>
    <dependency name='local' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/local'/>
    </dependency>
    <dependency name='log' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/system-log'/>
    </dependency>
    <dependent name='cyrus_multi-user' restart_on='none' grouping='optional_all'>
      <service_fmri value='svc:/milestone/multi-user'/>
    </dependent>
    <exec_method name='start' type='method' exec='/lib/svc/method/site/cyrus-master' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='root'/>
      </method_context>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='root'/>
      </method_context>
    </exec_method>
    <property_group name='startd' type='framework'>
      <propval name='ignore_error' type='astring' value='core,signal'/>
    </property_group>
    <stability value='Unstable'/>
    <template>
      <common_name>
        <loctext xml:lang='C'>Cyrus Master Server</loctext>
      </common_name>
    </template>
  </service>
</service_bundle>
-------------- next part --------------
#!/sbin/sh
#
# Start method script for the master Cyrus process
#

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin; export PATH
LMTPDIR=/var/run/imap
WASPROC=/imap/conf/proc
PROCDIR=$LMTPDIR/proc
MAS_PID=`cat /var/run/cyrus-master.pid 2>/dev/null`

. /lib/svc/share/smf_include.sh

if [ "$MAS_PID" -gt 0 ] && ps -p $MAS_PID >/dev/null 2>&1; then
	echo "$0: master is already running"
	exit $SMF_EXIT_ERR_NOSMF
fi

if [ ! -d $LMTPDIR ]; then
    mkdir $LMTPDIR
    chown cyrus:mail $LMTPDIR
    chmod 755 $LMTPDIR
fi

rm -rf $PROCDIR
mkdir $PROCDIR
chown cyrus:mail $PROCDIR
chmod 755 $PROCDIR

if [ ! -h $WASPROC ]; then
    rm -rf $WASPROC
    ln -s $PROCDIR $WASPROC
fi

echo "starting master"
/usr/local/cyrus/bin/master -d
echo "started master"
sleep 2
exit $SMF_EXIT_OK

#!/end


More information about the Info-cyrus mailing list