Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37047917
en ru br
ALT Linux repositórios
S:2.6.4-alt1
5.0: 2.3.43-alt2
4.1: 2.3.41-alt3.M41.3
4.0: 2.3.35-alt1.M40.1
3.0: 2.2.27-alt1.1

Group :: Sistema/Servidores
RPM: openldap

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
#
# slapd This shell script takes care of starting and stopping
# OpenLDAP server (slapd).
#
# chkconfig: 345 39 61
#
# description: LDAP stands for Lightweight Directory Access Protocol, used
# for implementing the industry standard directory services.
#
# processname: slapd
# config: /etc/openldap/
# pidfile: /var/run/slapd.pid
#
# Version 3.3.2 for OpenLDAP 2.2.22
# (modify by vserge For ALT Linux Team Sisyphus)
#
# From version of this script 3.1.0 SLURPD removed to different script
#

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

. cert-sh-functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

SLAPDURLLIST="'ldap://localhost/'"
# Source an auxiliary options file if we have one, and pick up OPTIONS,
# SLAPD_OPTIONS.
SourceIfNotEmpty /etc/sysconfig/ldap

if [ -f /etc/openldap/ldap.keytab ] ; then
export KRB5_KTNAME=/etc/openldap/ldap.keytab
fi

DAEMON=/usr/sbin/slapd
DAEMONTEST=/usr/sbin/slaptest
ROOT=/var/lib/ldap
CONFIG=/etc/openldap/slapd.conf
LOCKFILE=/var/lock/subsys/slapd
PIDFILE=$ROOT/var/run/slapd.pid
RETVAL=0

do_config_sanity_check()
{
action $"Checking slapd configuration" $DAEMONTEST -u || exit
}

adjust()
{
ssl_generate "slapd"
action $"Adjusting environment for slapd:" /etc/chroot.d/ldap.all || exit
}

start()
{
is_yes "$NETWORKING" || return 0
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user ldap -- $DAEMON -u ldap -r $ROOT -h "$SLAPDURLLIST" "$SLAPD_OPTIONS"
RETVAL=$?
return $RETVAL
}

stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user ldap $DAEMON
RETVAL=$?
return $RETVAL
}

restart()
{
do_config_sanity_check
stop
sleep 3
start
}


# See how we were called.
case "$1" in
start)
adjust
start
;;
stop)
stop
;;
status)
status --pidfile "$PIDFILE" --expect-user ldap $DAEMON
RETVAL=$?
;;
restart)
adjust
restart
;;
check)
do_config_sanity_check
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
adjust
restart
fi
;;
*)
msg_usage "${0##*/} {start|stop|status|check|restart|condstop|condrestart}"
RETVAL=1
esac

exit $RETVAL

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009