#!/bin/sh # # This script is a sample for writing an rc script to # automatically starts/stop the Netscape Directory Server # # BASEDIR must be updated with the netscape root installation directory # SLAPDINSTANCENAME must be updated with the directory instance name # then this script must be installed in /etc/rc2.d with name S72ns-slapd # # BASEDIR=/usr/netscape/server4/ SLAPDINSTANCENAME=`/usr/bin/hostname` USAGE="Usage: setup { start | stop | restart }" SLAPDDIR=$BASEDIR/slapd-$SLAPDINSTANCENAME case "$1" in 'start') rm -f $SLAPDDIR/logs/pid $SLAPDDIR/start-slapd $BASEDIR/start-admin echo "ns-slapd started" ;; 'stop') $SLAPDDIR/stop-slapd $BASEDIR/stop-admin ;; *) echo ${USAGE} exit 1 ;; esac exit 0