#!/bin/sh #ident $Id: ypldapd,v 1.5 1998/10/14 10:54:06 lukeh Exp $ # # /etc/init.d/ypldapd - Start/Stop the NIS gateway # # # The RPC subsystem should already be running by the time this starts. # PATH=/sbin:/bin:/usr/sbin:/usr/bin YPLDAPD_CONFIG=/opt/ypldapd/etc/ypldapd.conf test -x /opt/ypldapd/sbin/ypldapd || exit 0 if [ ! -f $YPLDAPD_CONFIG ]; then echo "Couldn't find $YPLDAPD_CONFIG; exiting" exit 1 fi case "$1" in start) echo "Starting ypldapd NIS server." start-stop-daemon --start --quiet --exec /opt/ypldapd/sbin/ypldapd ;; flush) echo "Flushing ypldapd NIS server cache." start-stop-daemon --signal HUP --stop --quiet --exec /opt/ypldapd/sbin/ypldapd ;; stop) echo "Stopping ypldapd NIS server." start-stop-daemon --stop --quiet --exec /opt/ypldapd/sbin/ypldapd ;; restart|force-reload) echo "Restarting ypldapd NIS server." start-stop-daemon --stop --quiet --exec /opt/ypldapd/sbin/ypldapd start-stop-daemon --start --quiet --exec /opt/ypldapd/sbin/ypldapd ;; *) echo "Usage: /etc/init.d/ypldapd {start|stop|restart}" exit 1 ;; esac exit 0