#!/bin/sh # # chkconfig: 345 96 10 # description: Open Directory Server # # Set the path to the OpenDS instance to manage . /etc/rc.d/init.d/functions INSTALL_ROOT="/opt/OpenDS-2.2.1" export INSTALL_ROOT SUBIT="su - opends -c " # Determine what action should be performed on the server case "${1}" in start) $SUBIT "${INSTALL_ROOT}/bin/start-ds --quiet >/dev/null 2>&1 &" action $"Starting $prog: " /bin/true exit ${?} ;; stop) $SUBIT "${INSTALL_ROOT}/bin/stop-ds --quiet >/dev/null 2>&1 &" action $"Stopping $prog: " /bin/true exit ${?} ;; restart) $SUBIT "${INSTALL_ROOT}/bin/stop-ds --restart --quiet >/dev/null 2>&1 &" action $"Restarting $prog: " /bin/true exit ${?} ;; *) echo "Usage: $0 { start | stop | restart }" exit 1 ;; esac