3 # SAMBA startup (init) script for LSB-compliant systems.
7 # Required-Stop: 0 2 1 6
9 # Default-Stop: 0 2 1 6
10 # Description: Starts and stops the SAMBA smbd and nmbd daemons \
11 # used to provide SMB network services.
14 # Source LSB function library.
15 .
/lib
/lsb
/init-functions
17 # Check that smb.conf exists.
18 if test ! -f /etc
/samba
/smb.conf
; then
19 log_failure_msg
"The smb.conf file does not exist."
23 # Make sure that smbd and nmbd exist...
24 if test ! -f /usr
/sbin
/nmbd
-o ! -f /usr
/sbin
/smbd
; then
25 log_failure_msg
"The nmbd and/or smbd daemons are not installed."
29 # See how we were called.
34 log_success_msg
"Started SMB services."
40 log_success_msg
"Shutdown SMB services."
44 # smbd and nmbd automatically re-read the smb.conf file...
45 log_success_msg
"Reload not necessary with SAMBA."
49 if test -z "`pidofproc smbd`"; then
50 log_success_msg
"smbd is not running."
52 log_success_msg
"smbd is running."
54 if test -z "`pidofproc nmbd`"; then
55 log_success_msg
"nmbd is not running."
57 log_success_msg
"nmbd is running."
62 restart | force-reload
)
68 echo "Usage: smb {start|stop|reload|force-reload|restart|status}"