#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
##  rc.openldap -- Run-Commands for OpenLDAP Daemon
##

%config
    openldap_enable="yes"

%start -p 200 -u root
    opServiceEnabled openldap || exit 0
    @l_prefix@/libexec/slapd

%stop -p 200 -u root
    opServiceEnabled openldap || exit 0
    kill -INT `cat @l_prefix@/var/openldap/slapd.pid`

%restart -u root
    opServiceEnabled openldap || exit 0
    kill -INT `cat @l_prefix@/var/openldap/slapd.pid`
    sleep 2
    @l_prefix@/libexec/slapd

