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 $?
Advertisements

1 comment so far

  1. J on

    This works great…Thanks!!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: