syncing packaging files from 3.0
[Samba.git] / packaging / PHT / TurboLinux / smb.init
blob6529977d2363b54a13f6c0fe192842ad94184168
1 #!/bin/sh
3 # chkconfig: 345 91 35
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 # Check that smb.conf exists.
17 [ -f /etc/smb.conf ] || exit 0
19 # See how we were called.
20 case "$1" in
21 start)
22 echo -n "Starting SMB services: "
23 daemon smbd -D
24 daemon nmbd -D
25 echo
26 touch /var/lock/subsys/smb
28 stop)
29 echo -n "Shutting down SMB services: "
30 killproc smbd
31 killproc nmbd
32 rm -f /var/lock/subsys/smb
33 echo ""
35 status)
36 status smbd
37 status nmbd
39 restart)
40 echo -n "Restarting SMB services: "
41 $0 stop
42 $0 start
43 echo "done."
46 echo "Usage: smb {start|stop|restart|status}"
47 exit 1
48 esac