Skip to content

Instantly share code, notes, and snippets.

@kylef
Created January 10, 2010 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylef/273288 to your computer and use it in GitHub Desktop.
Save kylef/273288 to your computer and use it in GitHub Desktop.
This is a SMF script for OpenSolaris for ZNC
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='znc'>
<service
name='network/irc'
type='service'
version='1' >
<instance name='znc' enabled='false'>
<dependency name='network'
grouping='require_all'
restart_on='error'
type='service'>
<service_fmri value='svc:/milestone/network:default'/>
</dependency>
<dependency name='network_ipfilter'
grouping='optional_all'
restart_on='error'
type='service'>
<service_fmri value='svc:/network/ipfilter:default' />
</dependency>
<dependency name='filesystem-local'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/filesystem/local:default'/>
</dependency>
<exec_method
type='method'
name='start'
exec='znc -d %{config/datadir}'
timeout_seconds='60'>
<method_context>
<method_credential
user='znc'
group='znc'
privileges='basic,priv_net_privaddr' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec=':kill'
timeout_seconds='60' />
<exec_method
type='method'
name='refresh'
exec=':kill -HUP'
timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='datadir' type='astring' value='/etc/znc'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<property_group name='firewall_config' type='com.sun,fw_configuration'>
<propval name='policy' type='astring' value='use_global' />
<propval name='apply_to' type='astring' value='' />
<propval name='exceptions' type='astring' value='' />
<propval name='value_authorization' type='astring'
value='solaris.smf.value.firewall.config' />
</property_group>
<template>
<common_name>
<loctext xml:lang="C">
znc
</loctext>
</common_name>
</template>
</instance>
<stability value='Evolving' />
</service>
</service_bundle>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment