summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian-unstable/winbind.init
blob: 2dfdf3b83527565d42a6aaca2d4897a0f85c9520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
#
# Start/stops the winbindd daemon.
#
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin

DAEMON=/usr/sbin/winbindd

# clear conflicting settings from the environment
unset TMPDIR

# See if the daemon is there
test -x $DAEMON || exit 0

case "$1" in
	start)
		echo -n "Starting the Winbind daemon: winbindd"

		start-stop-daemon --start --quiet --exec $DAEMON

		echo "."
		;;
	stop)
		echo -n "Stopping the Winbind daemon: winbindd"

		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON

		echo "."
		;;
	restart|force-reload)
		echo -n "Restarting the Winbind daemon: winbindd"

		start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
		sleep 2
		start-stop-daemon --start --quiet --exec $DAEMON

		echo "."
		;;
	*)
		echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
		exit 1
		;;
esac

exit 0