Skip to content

Instantly share code, notes, and snippets.

@mattconnolly
Created April 25, 2012 00:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mattconnolly/2484917 to your computer and use it in GitHub Desktop.
Save mattconnolly/2484917 to your computer and use it in GitHub Desktop.
OpenIndiana SMF manifest for running openvpn as a service
<?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/openvpn" type="service" version="0">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="fs" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/system/filesystem/local"/>
</dependency>
<dependency name="net" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/network/loopback"/>
</dependency>
<exec_method name="start" type="method" exec="/usr/sbin/openvpn --config /etc/openvpn/config --daemon" timeout_seconds="60">
<method_context working_directory="/var/log">
<method_credential user="root" group="root"/>
<method_environment>
<envvar name="PATH" value="/usr/sbin:/usr/bin:/bin"/>
</method_environment>
</method_context>
</exec_method>
<exec_method name="stop" type="method" exec=":kill" timeout_seconds="60">
<method_context/>
</exec_method>
<stability value="External"/>
<template>
<common_name>
<loctext xml:lang="C">openvpn</loctext>
</common_name>
<documentation>
<manpage title="openvpn" section="8" manpath="/usr/share/man"/>
<doc_link name="openvpn.net" uri="http://openvpn.net/index.php/manuals"/>
</documentation>
</template>
</service>
</service_bundle>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment