~hww3/caudium

cd8eab0ca335a82357794abfb96bff90d9809108 — William Welliver 2 years ago f6e9e07
Add illumos/Solaris SMF support. Also add some installation guidance.
2 files changed, 41 insertions(+), 1 deletions(-)

M Makefile.in
A tools/smf/caudium.xml
M Makefile.in => Makefile.in +10 -1
@@ 60,7 60,7 @@ clean:
#	@(cd extern;$(MAKE) "prefix=$(prefix)" "CC=$(CC)" "LDFLAGS=$(LDFLAGS)" clean)
	@(cd tools;$(MAKE) "prefix=$(prefix)" "CC=$(CC)" "LDFLAGS=$(LDFLAGS)" clean)
	@(cd src;$(MAKE) "prefix=$(prefix)" "CC=$(CC)" "LDFLAGS=$(LDFLAGS)" clean)
install: all install_only
install: all how_to_setup install_only smf
	@(cd tools;$(MAKE) "prefix=$(prefix)" "CC=$(CC)" "LDFLAGS=$(LDFLAGS)" INSTALL="$(INSTALL)" install)
	-@$(BIN_TRUE)



@@ 370,6 370,15 @@ solaris_pkg: all
	@tools/build_solaris_pkg.ksh `cat VERSION` $(PIKE)
	@rm VERSION

how_to_setup:	install_only
	@echo "\\n\\nIf this is a clean install of Caudium into ${prefix}, please run \\n the first-time configuration utility: \\n   ${prefix}/caudium/server/install \\n \\n"

smf: install_only
	@if test -x /usr/sbin/svccfg ; then \
	mkdir -p ${prefix}/caudium/local/smf ; \
	sed -e 's#_PREFIX_#${prefix}/caudium#' tools/smf/caudium.xml > ${prefix}/caudium/local/smf/caudium.xml ; \
	echo "\\n\\nThis system is SMF enabled. A service definition for Caudium is located in:\\n\\n   ${prefix}/caudium/local/smf \\n\\nEnable it using this command: \\n\\n    /usr/sbin/svccfg -s svc:/application/caudium:default import ${prefix}/caudium/local/smf/caudium.xml\\n\\n"; \
	fi 
#
# Compilefarm 
#

A tools/smf/caudium.xml => tools/smf/caudium.xml +31 -0
@@ 0,0 1,31 @@
<?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='application/caudium' type='service' version='0'>
    <create_default_instance enabled='true'/>
      <single_instance/>
      <dependency name='network' grouping='require_all' restart_on='none' type='service'>
         <service_fmri value='svc:/milestone/network:default'/>
      </dependency>
      <dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
         <service_fmri value='svc:/system/filesystem/local:default'/>
      </dependency>
     <method_context working_directory='_PREFIX_'/>
     <exec_method name='start' type='method' exec='server/start-caudium --once' timeout_seconds='60'/>
     <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
     <property_group name="startd" type="framework">
       <propval name="duration" type="astring" value="child"/>
       <propval name="ignore_error" type="astring" value="core,signal"/>
     </property_group> 
     <template>
       <common_name>
         <loctext xml:lang='C'>caudium web server</loctext>
       </common_name>
       <documentation>
         <manpage title='caudium' section='1' manpath='/opt/local/man'/>
         <doc_link name='homepage' uri='http://caudium.net'/>
       </documentation>
     </template>
  </service>
</service_bundle>