Skip to content

Instantly share code, notes, and snippets.

@cheeseplus
Created February 18, 2013 20:09
Show Gist options
  • Save cheeseplus/4980250 to your computer and use it in GitHub Desktop.
Save cheeseplus/4980250 to your computer and use it in GitHub Desktop.
<?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='site/set-hostname' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>
    <dependency name='network' grouping='require_all' restart_on='error' type='ser
vice'>
      <service_fmri value='svc:/milestone/network:default'/>
    </dependency>
    <dependency name='filesystem' grouping='require_all' restart_on='error' type='
service'>
      <service_fmri value='svc:/system/filesystem/local'/>
    </dependency>
    <exec_method name='start' type='method' exec='hostname optiplex' timeout_secon
ds='60'>
      <method_context>
        <method_credential user='root' group='staff'/>
        <method_environment>
          <envvar name='PATH' value='/usr/bin:/usr/sbin:/bin'/>
        </method_environment>
      </method_context>
    </exec_method>
    <exec_method name='restart' type='method' exec=':kill' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='staff'/>
      </method_context>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
      <method_context>
        <method_credential user='root' group='staff'/>
      </method_context>
    </exec_method>
    <property_group name='startd' type='framework'>
      <propval name='duration' type='astring' value='transient'/>
      <propval name='ignore_error' type='astring' value='core,signal'/>
    </property_group>
    <property_group name='application' type='application'/>
    <stability value='Evolving'/>
    <template>
      <common_name>
        <loctext xml:lang='C'>set hostname</loctext>
      </common_name>
    </template>
  </service>
</service_bundle>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment