1#!/bin/sh
2#
3# Start/stops the winbindd daemon.
4#
5#
6
7PATH=/sbin:/bin:/usr/sbin:/usr/bin
8
9DAEMON=/usr/sbin/winbindd
10
11# clear conflicting settings from the environment
12unset TMPDIR
13
14# See if the daemon is there
15test -x $DAEMON || exit 0
16
17case "$1" in
18	start)
19		echo -n "Starting the Winbind daemon: winbindd"
20
21		start-stop-daemon --start --quiet --exec $DAEMON
22
23		echo "."
24		;;
25	stop)
26		echo -n "Stopping the Winbind daemon: winbindd"
27
28		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
29
30		echo "."
31		;;
32	restart|force-reload)
33		echo -n "Restarting the Winbind daemon: winbindd"
34
35		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
36		sleep 2
37		start-stop-daemon --start --quiet --exec $DAEMON
38
39		echo "."
40		;;
41	*)
42		echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
43		exit 1
44		;;
45esac
46
47exit 0
48
49