You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
##
## rc.openldap -- Run-Commands
##
%config
openldap_enable="$openpkg_rc_def"
23 years ago
openldap_log_prolog="true"
openldap_log_epilog="true"
openldap_log_numfiles="10"
openldap_log_minsize="1M"
openldap_log_complevel="9"
%start -p 200 -u @l_susr@
opService openldap enable yes || exit 0
@l_prefix@/libexec/openldap/slapd
%stop -p 200 -u @l_susr@
opService openldap enable yes || exit 0
kill -INT `cat @l_prefix@/var/openldap/slapd.pid`
%restart -u @l_susr@
opService openldap enable yes || exit 0
kill -INT `cat @l_prefix@/var/openldap/slapd.pid`
sleep 2
@l_prefix@/libexec/openldap/slapd
23 years ago
%daily -u @l_susr@
opService openldap enable yes || exit 0
23 years ago
# rotate logfile
shtool rotate -f \
-n${openldap_log_numfiles} -s${openldap_log_minsize} -d \
-z${openldap_log_complevel} -o@l_rusr@ -g@l_rgrp@ -m644 \
-P "${openldap_log_prolog}" \
-E "${openldap_log_epilog}" \
@l_prefix@/var/openldap/openldap.log