#!/bin/sh # # Program: Startup script for openldap # # Author: Matty < matty91 at gmail dot com > # # Current Version: 1.0 # # Revision History: # # Version 1.0 # Initial Release # # Last Updated: 01-06-2007 # # Purpose: # Rc script for the openldap server. # # License: # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # USER="openldap" GROUP="openldap" CONFIG="/etc/openldap/slapd.conf" HOSTSTRING="ldap://ldap.prefetch.net ldaps://ldap.prefetch.net" case "$1" in start) # Start the Directory Server echo "Starting OpenLDAP server" slapd -f ${CONFIG} -u ${USER} -g ${GROUP} -h ${HOSTSTRING} > /dev/null 2>&1 ;; stop) echo "Stopping OpenLDAP Server" pkill -HUP slapd > /dev/null 2>&1 ;; *) /usr/ucb/echo "Usage: $0 {start|stop}" exit 1 esac exit 0