IBM Tivoli Directory Server init script for RedHat

Nice and easy init.d script for IBM Tivoli Directory server 6.3 on RedHat (or CentOS for that matter)

#!/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.3/sbin/slapd
        RETVAL=$?
        touch /var/lock/subsys/ibmslapd
        return $RETVAL
}

stop() {
        echo -n "Shutting down ibmslapd: "
        /opt/ibm/ldap/V6.3/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 $?
This entry was posted in , IBM WebSphere. Bookmark the permalink.

Leave a Reply