On Tue, Oct 04, 2005 at 10:07:12AM -0700, Jonathan Adams wrote:
> On Tue, Oct 04, 2005 at 06:32:28AM -0700, Andreas Koppenhoefer wrote:
> > Oh that's tricky!To comment something without seeing it. We are
> > engineers and no politicians.
> > 
> > Maybe you should post your manifest. That would help us very much.  ;-)
> 
> Well, he did attach it to the e-mail, but those reading from the website
> may not be able to see it.

Here's what he sent out:

--- cut here --- lighttpd.xml
<?xml version="1.0"?> 
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 
<!--
    lighttpd.xml: Based on MySQL manifest, Fabian Otto
    mysql.xml : MySQL manifest, Scott Fehrman, Systems Engineer
--> 

<service_bundle type='manifest' name='lighttpd'> 
<service
   name='network/lighttpd'
   type='service'
   version='1'> 

   <!-- http://www.sun.com/bigadmin/content/selfheal/sdev_intro.html
    says not to do 
   <single_instance /> 
   --> 

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

           <dependency name='configuration'
              grouping='require_all'
              restart_on='none'
              type='path'> 
              <service_fmri 
value='file://localhost/etc/opt/lighttpd/lighttpd.conf'/> 
           </dependency> 
        
           <dependency name='network'
                    grouping='require_any'
                    restart_on='error'
                    type='service'>
                        <service_fmri value='svc:/network/service' />
           </dependency>

           <dependent
                name='lighttpd_multi-user'
                grouping='require_all'
                restart_on='none'>
                <service_fmri value='svc:/milestone/multi-user' />
           </dependent> 
        
           <exec_method
              type='method' 
              name='start'
              exec='/lib/svc/method/lighttpd start'
              timeout_seconds='60' /> 
        
           <exec_method 
              type='method' 
              name='stop'
              exec='/lib/svc/method/lighttpd stop'
              timeout_seconds='60' /> 
        
           <exec_method
              type='method'
              name='refresh'
              exec='/lib/svc/method/lighttpd restart'
              timeout_seconds='60' /> 


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

   <stability value='Unstable' /> 


   <template> 
      <common_name> 
         <loctext xml:lang='C'> lighttpd Webserver 1.4.3 </loctext> 
      </common_name> 
      <documentation> 
         <manpage title='lighttpd' section='1' manpath='/opt/local/man/' /> 
      </documentation> 
   </template> 

</service> 
</service_bundle>
--- cut here --- lighttpd.xml

--- cut here --- lighttpd
#!/sbin/sh
#
# Based on smtp-postfix
. /lib/svc/share/smf_include.sh

LIGHTY="/opt/local/sbin/lighttpd"
CONF="/etc/opt/lighttpd/lighttpd.conf"
PID_FILE="/var/run/lighttpd.pid"


[ ! -f ${CONF} ] && exit ${SMF_EXIT_ERR_CONFIG}

case "$1" in 
'start')
        rm -f ${PID}
        exec ${LIGHTY} -f ${CONF} 2>&1
        ;;

'stop')
        /usr/bin/kill -TERM `/usr/bin/cat ${PID_FILE}`
        ;;

'refresh')
        /usr/bin/kill -HUP `/usr/bin/cat ${PID_FILE}`
        ;;
*)
        echo "Usage: $0 { start | stop | refresh }"
        exit 1
        ;;
esac
exit 0
--- cut here --- lighttpd

- jonathan
:w

-- 
Jonathan Adams, Solaris Kernel Development

Reply via email to