4 # description: Starts and stops the Samba smbd and nmbd daemons \
5 # used to provide SMB network services.
7 # Source function library.
8 . /etc/rc.d/init.d/functions
10 # Source networking configuration.
11 . /etc/sysconfig/network
13 # Check that networking is up.
14 [ ${NETWORKING} = "no" ] && exit 0
16 CONFIG=/etc/samba/smb.conf
18 # Check that smb.conf exists.
19 [ -f $CONFIG ] || exit 0
21 # See how we were called.
24 echo -n "Starting SMB services: "
27 if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
31 touch /var/lock/subsys/smb
34 echo -n "Shutting down SMB services: "
37 if [ "`ps -ef | grep winbind | grep -v grep`" ]; then
40 rm -f /var/lock/subsys/smb
49 echo -n "Restarting SMB services: "
55 echo "Usage: smb {start|stop|restart|status}"