[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

starting slapd automatically with SSL



Hello,

I have modified my /etc/init.d/slapd file to automatically
invoke slapd with -h ldaps://

However, this works when typed manually, however, when my computer
rebooted, it did not have this extra parameter. (as shown by ps).

Any ideas? Have I done anything obviously wrong?

Here is the file:

#! /bin/sh
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Debian by Christoph Lameter <clameter@debian.org>
# Modified for OpenLDAP by Ben Collins <bcollins@debian.org>

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/slapd
SLURPD=/usr/sbin/slurpd
PORT=389
pidfile=`grep ^pidfile /etc/ldap/slapd.conf | awk '{print $2}'`
if [ -z "$pidfile" ]; then
    pidfile="/var/run/slapd.pid"
fi

test -f $DAEMON || exit 0

case "$1" in
  start)
    echo -n "Starting ldap server(s):"
    echo -n " slapd"
    start-stop-daemon --start --quiet --pidfile "$pidfile" \
		--exec $DAEMON -- -h ldaps://
#    replicas=`grep ^replica /etc/ldap/slapd.conf`
#    test -z "$replicas" || (echo -n " slurpd" && start-stop-daemon --start \
#    		--quiet --name slurpd --exec $SLURPD)
    echo "."
    ;;
  stop)
    echo -n "Stopping ldap server(s):"
    echo -n " slapd"
    if [ -f "$pidfile" ]; then
        kill `cat $pidfile` > /dev/null 2>&1
	rm -f $pidfile
    fi
#    replicas=`grep ^replica /etc/ldap/slapd.conf`
#    test -z "$replicas" || (echo -n " slurpd" && killall slurpd > /dev/null 2>&1)
    echo "."
    ;;
  restart|force-reload)
    echo "Restarting ldap server(s):"
    echo -n "  "
    $0 stop
    sleep 2 # give it some time to die
    echo -n "  "
    $0 start
    ;;
  force-stop)
    echo -n "Stopping ldap servers (force): "
    killall slapd slurpd > /dev/null 2>&1
    echo "done."
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|force-stop}"
    exit 1
    ;;
esac

exit 0
-- 
Brian May <bam@debian.org>



Reply to: