Skip to content

Instantly share code, notes, and snippets.

@85degree
Last active August 29, 2015 14:10

Revisions

  1. @Apung Apung revised this gist Nov 25, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions slapd.xml
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,6 @@
    <?xml version="1.0"?>
    <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    <!--
    Created by Manifold
    --><service_bundle type="manifest" name="slapd">
    <service_bundle type="manifest" name="slapd">
    <service name="slapd" type="service" version="1">
    <create_default_instance enabled="false"/>
    <single_instance/>
  2. @Apung Apung revised this gist Nov 25, 2014. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions smartos-smf-manifest-slapd.md
    Original file line number Diff line number Diff line change
    @@ -17,5 +17,9 @@ svcadm enable slapd

    Check the service:
    ```
    svcs slapd
    ```
    and
    ```
    ps auxw | grep slapd
    ```
  3. @Apung Apung revised this gist Nov 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion smartos-smf-manifest-slapd.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Save slapd.xml below to your current directory
    Save slapd.xml above to your current directory

    Then run:
    ```
  4. @Apung Apung renamed this gist Nov 25, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion slapd.md → smartos-smf-manifest-slapd.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Save slapd.xml to your current directory
    Save slapd.xml below to your current directory

    Then run:
    ```
  5. @Apung Apung revised this gist Nov 25, 2014. 2 changed files with 38 additions and 39 deletions.
    41 changes: 2 additions & 39 deletions slapd.md
    Original file line number Diff line number Diff line change
    @@ -1,42 +1,5 @@
    Save this to slapd.xml at your root
    ```
    <?xml version="1.0"?>
    <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    <!--
    Created by Manifold
    --><service_bundle type="manifest" name="slapd">
    <service name="slapd" type="service" version="1">
    <create_default_instance enabled="false"/>
    <single_instance/>
    <dependency name="network" grouping="require_all" restart_on="error" type="service">
    <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>
    <method_context>
    <method_credential user="root" group="root"/>
    </method_context>
    <exec_method type="method" name="start" exec="/opt/local/sbin/slapd -f %{config_file}" timeout_seconds="60"/>
    <exec_method type="method" name="stop" 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>
    <property_group name="application" type="application">
    <propval name="config_file" type="astring" value="/opt/local/etc/openldap/slapd.conf"/>
    </property_group>
    <stability value="Evolving"/>
    <template>
    <common_name>
    <loctext xml:lang="C">
    OpenLDAP Server
    </loctext>
    </common_name>
    </template>
    </service>
    </service_bundle>
    ```
    Save slapd.xml to your current directory

    Then run:
    ```
    svccfg validate slapd.xml
    36 changes: 36 additions & 0 deletions slapd.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    <?xml version="1.0"?>
    <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    <!--
    Created by Manifold
    --><service_bundle type="manifest" name="slapd">
    <service name="slapd" type="service" version="1">
    <create_default_instance enabled="false"/>
    <single_instance/>
    <dependency name="network" grouping="require_all" restart_on="error" type="service">
    <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>
    <method_context>
    <method_credential user="root" group="root"/>
    </method_context>
    <exec_method type="method" name="start" exec="/opt/local/sbin/slapd -f %{config_file}" timeout_seconds="60"/>
    <exec_method type="method" name="stop" 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>
    <property_group name="application" type="application">
    <propval name="config_file" type="astring" value="/opt/local/etc/openldap/slapd.conf"/>
    </property_group>
    <stability value="Evolving"/>
    <template>
    <common_name>
    <loctext xml:lang="C">
    OpenLDAP Server
    </loctext>
    </common_name>
    </template>
    </service>
    </service_bundle>
  6. @Apung Apung renamed this gist Nov 25, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. @Apung Apung created this gist Nov 25, 2014.
    58 changes: 58 additions & 0 deletions slapd.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    Save this to slapd.xml at your root
    ```
    <?xml version="1.0"?>
    <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
    <!--
    Created by Manifold
    --><service_bundle type="manifest" name="slapd">
    <service name="slapd" type="service" version="1">
    <create_default_instance enabled="false"/>
    <single_instance/>
    <dependency name="network" grouping="require_all" restart_on="error" type="service">
    <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>
    <method_context>
    <method_credential user="root" group="root"/>
    </method_context>
    <exec_method type="method" name="start" exec="/opt/local/sbin/slapd -f %{config_file}" timeout_seconds="60"/>
    <exec_method type="method" name="stop" 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>
    <property_group name="application" type="application">
    <propval name="config_file" type="astring" value="/opt/local/etc/openldap/slapd.conf"/>
    </property_group>
    <stability value="Evolving"/>
    <template>
    <common_name>
    <loctext xml:lang="C">
    OpenLDAP Server
    </loctext>
    </common_name>
    </template>
    </service>
    </service_bundle>
    ```
    Then run:
    ```
    svccfg validate slapd.xml
    ```

    Then import:
    ```
    svccfg import slapd.xml
    ```

    Enable service:
    ```
    svcadm enable slapd
    ```

    Check the service:
    ```
    ps auxw | grep slapd
    ```