4 # description: Starts and stops the Samba winbind daemon to provide\
5 # user and group information from a NT domain controller to linux.
7 # config: /etc/samba/smb.conf
8 # processname: winbindd
10 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 # Source networking configuration.
16 . /etc/sysconfig/network
18 winbindd_pidfile="/var/run/samba/winbindd.pid"
20 # Daemon specific configuration.
21 . /etc/sysconfig/winbind
23 # Check that networking is up.
24 if is_yes "${NETWORKING}"; then
25 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
26 msg_network_down winbindd
33 TMPDIR="/tmp"; export TMPDIR
35 # Check that smb.conf exists.
36 [ -f /etc/samba/smb.conf ] || exit 0
39 if [ ! -f /var/lock/subsys/winbind ]; then
41 daemon /usr/sbin/winbindd
43 if [ $RETVAL -eq 0 ]; then
44 touch /var/lock/subsys/winbind
48 msg_already_running winbindd
53 if [ -f /var/lock/subsys/winbind ]; then
55 killproc --pidfile $winbindd_pidfile winbindd
56 rm -f /var/lock/subsys/winbind >/dev/null 2>&1
58 msg_not_running winbindd
63 if [ -f /var/lock/subsys/winbind ]; then
67 msg_not_running winbindd
73 # See how we were called.
86 if [ -f /var/lock/subsys/winbind ]; then
87 msg_reloading winbindd
88 killproc --pidfile $winbindd_pidfile winbindd -HUP
91 msg_not_running winbindd
103 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"