#! /bin/sh
# STTA Rev. 1.3 Copyright (c) 2001-2002 Jess Prez Lorenzo  --- license GNU GPL
# Rc for Iplanet.
#
#
# Change names here to adjust
ServerNames="ttaldap ttacache"

case "$1" in
    start)
        echo -n "Activando Servidores LDAP Iplanet:"
        for nom in `echo $ServerNames` 
        do 
            $LDAPDIR/slapd-$nom/start-slapd
	    [ $? -eq 0 ] && echo -n " $nom "
        done
	;;
    stop)
	echo -n "Shutting down Iplanet LDAP: "
        for nom in `echo $ServerNames` 
        do 
            $LDAPDIR/slapd-$nom/stop-slapd
	    [ $? -eq 0 ] && echo -n " $nom "
	    #[ $? -ne 0 ] && echo -n "- Warning: error al desconectar ($nom)! "
        done
	;;
    restart)
	$0 stop
	$0 start
	;;
    status)
	echo -n "Checking Netscape LDAP "
        ps -ef | fgrep slapd
	;;
    *)
	echo "Usage: $0 {start|stop|status|restart}"
	exit 1
	;;
esac

