#!/bin/bash
# Begin $rc_base/init.d/winbind

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org

#$LastChangedBy: dj $
#$Date: 2004-10-05 16:33:13 -0600 (Tue, 05 Oct 2004) $

. /etc/sysconfig/rc
. $rc_functions

PIDFILE="/var/run/winbindd.pid"
KILLDELAY="10"

case "$1" in

        start)
                echo "Starting winbind..."
                loadproc /usr/sbin/winbindd
                ;;

        stop)
                echo "Stopping winbind..."
		killproc
		;;

	reload)
		echo "Reloading winbind..."
		reloadproc /usr/sbin/winbindd
		;;

        restart)
                $0 stop
                sleep 1
                $0 start
                ;;

        status)
                statusproc /usr/sbin/winbindd
                ;;

        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
                ;;

esac

# End $rc_base/init.d/winbind
