Archive for January, 2009|Monthly archive page

Tivoli Directory Server init script for redhat

Here is a very simple init script for IBM Tivoli Directory Server V. 6.0.

Bye!

#!/bin/bash
#
#       /etc/init.d/ibmslapd
#
#       IBM Tivoli init script
#       2009 - Emilio Scalise, < emisca at rocketmail dot com >
#
# chkconfig: 345 70 20
#
# description: IBM Tivoli init script

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

start() {
        echo -n "Starting ibmslapd: "
        daemon --check ibmslapd /opt/ibm/ldap/V6.0/sbin/slapd
        RETVAL=$?
        touch /var/lock/subsys/ibmslapd
        return $RETVAL
}

stop() {
        echo -n "Shutting down ibmslapd: "
        /opt/ibm/ldap/V6.0/sbin/slapd -k
        RETVAL=$?
        rm -f /var/lock/subsys/ibmslapd
        return $RETVAL
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo "Usage: ibmslapd {start|stop|status|reload|restart[|probe]"
        exit 1
        ;;
esac
exit $?