Fix bug 5913.
[Samba.git] / packaging / Debian / debian-unstable / winbind.init
blob18e342597b4539534680743db98e8ae2f5f780f0
1 #!/bin/sh
3 # Start/stops the winbindd daemon.
7 PATH=/sbin:/bin:/usr/sbin:/usr/bin
9 DAEMON=/usr/sbin/winbindd
11 # clear conflicting settings from the environment
12 unset TMPDIR
14 # See if the daemon is there
15 test -x $DAEMON || exit 0
17 . /lib/lsb/init-functions
19 case "$1" in
20 start)
21 log_daemon_msg "Starting the Winbind daemon" "winbind"
23 start-stop-daemon --start --quiet --exec $DAEMON
25 log_end_msg $?
28 stop)
29 log_daemon_msg "Stopping the Winbind daemon" "winbind"
31 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
33 log_end_msg $?
36 restart|force-reload)
37 log_daemon_msg "Restarting the Winbind daemon" "winbind"
39 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
40 sleep 2
41 start-stop-daemon --start --quiet --exec $DAEMON
43 log_end_msg $?
46 echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}"
47 exit 1
49 esac
51 exit 0