Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Jacques Marneweck http://www.powertrip.co.za/

Memcache SMF

// description of your code here

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
  <service name='network/memcached' type='service' version='0'>
    <create_default_instance enabled='false'/>
    <single_instance/>
    <dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
      <service_fmri value='svc:/network/loopback:default'/>
    </dependency>
    <exec_method name='start' type='method' exec='/opt/local/sbin/memcached -d -l 127.0.0.1 -u nobody -m 2048' timeout_seconds='30'>
      <method_context/>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='30'>
      <method_context/>
    </exec_method>
    <template>
      <common_name>
        <loctext xml:lang='C'>memcached</loctext>
      </common_name>
      <documentation>
        <doc_link name='memcached Official' uri='http://www.danga.com/memcached/'/>
      </documentation>
    </template>
  </service>
</service_bundle>

Installs pecl memcache php5 extension on a Joyent Accelerator

//

#!/bin/sh
# Installs pecl memcache php5 extension on a Joyent Accelerator
#
# $Id$

VERSION=2.2.3
TEMPDIR=`/usr/bin/mktemp`

cd ${TEMPDIR}
/usr/sfw/bin/wget http://pecl.php.net/get/memcache-${VERSION}.tgz
/opt/local/bin/tar -zxvf memcache-${VERSION}.tgz
cd memcache-${VERSION}
/opt/local/bin/phpize
./configure
/usr/bin/make
/usr/bin/make install
/opt/local/bin/gsed -i"" "s/;extension=memcache.so/extension=memcache.so/" /opt/local/etc/php.ini