3
# "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $"
5
# SAMBA startup (init) script for LSB-compliant systems.
9
# Required-Stop: 0 2 1 6
11
# Default-Stop: 0 2 1 6
12
# Description: Starts and stops the SAMBA smbd and nmbd daemons \
13
# used to provide SMB network services.
16
# Source LSB function library.
17
. /lib/lsb/init-functions
19
# Check that smb.conf exists.
20
if test ! -f /etc/samba/smb.conf; then
21
log_failure_msg "The smb.conf file does not exist."
25
# Make sure that smbd and nmbd exist...
26
if test ! -f /usr/sbin/nmbd -o ! -f /usr/sbin/smbd; then
27
log_failure_msg "The nmbd and/or smbd daemons are not installed."
31
# See how we were called.
36
log_success_msg "Started SMB services."
42
log_success_msg "Shutdown SMB services."
46
# smbd and nmbd automatically re-read the smb.conf file...
47
log_success_msg "Reload not necessary with SAMBA."
51
if test -z "`pidofproc smbd`"; then
52
log_success_msg "smbd is not running."
54
log_success_msg "smbd is running."
56
if test -z "`pidofproc nmbd`"; then
57
log_success_msg "nmbd is not running."
59
log_success_msg "nmbd is running."
64
restart | force-reload)
70
echo "Usage: smb {start|stop|reload|force-reload|restart|status}"
79
# End of "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $".