Blame SOURCES/nslcd.init

df3ee2
#!/bin/sh
df3ee2
#
df3ee2
# chkconfig: - 12 88 
df3ee2
# description: Provides naming services using a directory server.
df3ee2
# processname: /usr/sbin/nslcd
df3ee2
# config: /etc/nslcd.conf
df3ee2
# pidfile: /var/run/nslcd/nslcd.pid
df3ee2
#
df3ee2
df3ee2
### BEGIN INIT INFO
df3ee2
# Provides: nslcd
df3ee2
# Required-Start: $network
df3ee2
# Required-Stop:
df3ee2
# Default-Start:
df3ee2
# Default-Stop:
df3ee2
# Short-Description: naming services LDAP client daemon
df3ee2
# Description: Provides naming services using a directory server.
df3ee2
### END INIT INFO
df3ee2
df3ee2
program=/usr/sbin/nslcd
df3ee2
prog=${program##*/}
df3ee2
pidfile=/var/run/nslcd/nslcd.pid
df3ee2
df3ee2
if [ -f /etc/rc.d/init.d/functions ]; then
df3ee2
	. /etc/rc.d/init.d/functions
df3ee2
fi
df3ee2
df3ee2
RETVAL=0
df3ee2
df3ee2
start() {
df3ee2
    echo -n $"Starting $prog: "
df3ee2
    daemon $program
df3ee2
    RETVAL=$?
df3ee2
    echo
df3ee2
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
df3ee2
    return $RETVAL
df3ee2
}
df3ee2
df3ee2
stop() {
df3ee2
    echo -n $"Stopping $prog: "
df3ee2
    killproc $program
df3ee2
    RETVAL=$?
df3ee2
    echo
df3ee2
    if [ $RETVAL -eq 0 ]; then
df3ee2
	rm -f /var/lock/subsys/$prog
df3ee2
    fi
df3ee2
}
df3ee2
df3ee2
restart() {
df3ee2
    stop
df3ee2
    start
df3ee2
}
df3ee2
df3ee2
# See how we were called.
df3ee2
case "$1" in
df3ee2
    start)
df3ee2
        [ -f /var/lock/subsys/$prog ] && exit 0
df3ee2
        $1
df3ee2
        ;;
df3ee2
    stop)
df3ee2
        [ -f /var/lock/subsys/$prog ] || exit 0
df3ee2
        $1
df3ee2
        ;;
df3ee2
    restart)
df3ee2
        $1
df3ee2
        ;;
df3ee2
    status)
df3ee2
        status -p $pidfile $program
df3ee2
        RETVAL=$?
df3ee2
        ;;
df3ee2
    condrestart|try-restart)
df3ee2
        [ -f /var/lock/subsys/$prog ] && restart || :
df3ee2
        ;;
df3ee2
    reload)
df3ee2
        echo "can't reload configuration, you have to restart it"
df3ee2
        RETVAL=3
df3ee2
        ;;
df3ee2
    force-reload)
df3ee2
        restart
df3ee2
        ;;
df3ee2
    *)
df3ee2
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
df3ee2
        exit 1
df3ee2
        ;;
df3ee2
esac
df3ee2
exit $RETVAL