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 17. /lib/lsb/init-functions 18 19case "$1" in 20 start) 21 log_daemon_msg "Starting the Winbind daemon" "winbind" 22 23 start-stop-daemon --start --quiet --exec $DAEMON 24 25 log_end_msg $? 26 ;; 27 28 stop) 29 log_daemon_msg "Stopping the Winbind daemon" "winbind" 30 31 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON 32 33 log_end_msg $? 34 ;; 35 36 restart|force-reload) 37 log_daemon_msg "Restarting the Winbind daemon" "winbind" 38 39 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON 40 sleep 2 41 start-stop-daemon --start --quiet --exec $DAEMON 42 43 log_end_msg $? 44 ;; 45 *) 46 echo "Usage: /etc/init.d/winbind {start|stop|restart|force-reload}" 47 exit 1 48 ;; 49esac 50 51exit 0 52 53