Skip to content

Instantly share code, notes, and snippets.

@bahamas10
Created April 7, 2014 21:06
Show Gist options
  • Save bahamas10/10055980 to your computer and use it in GitHub Desktop.
Save bahamas10/10055980 to your computer and use it in GitHub Desktop.
djbdns smf manifest smartos
<?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/djbdns' type='service' version='0'>
<create_default_instance enabled='true'/>
<dependency name='dep0' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/multi-user:default'/>
</dependency>
<exec_method name='start' type='method' exec='tinydns &amp;' timeout_seconds='10'>
<method_context working_directory='/opt/local/etc/tinydns'>
<method_credential user='root' group='root'/>
<method_environment>
<envvar name='IP' value='1.2.3.4'/> <!-- should be one ip address, DNS doesn't seem to like `0.0.0.0` -->
<envvar name='ROOT' value='/opt/local/etc/tinydns/root'/> <!-- djbdns handles chroot, setuid, and setgid -->
<envvar name='UID' value='60001'/> <!-- make this some nobody user -->
<envvar name='GID' value='60001'/>
</method_environment>
</method_context>
</exec_method>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='30'/>
<template>
<common_name>
<loctext xml:lang='C'>djbdns Name Server</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