* Merged newxml into HEAD
[linux_from_scratch.git] / bootscripts / blfs / init.d / samba
blob841a6a413d24abecd0fe9e458ca34566ff2de2f1
1 #!/bin/sh
2 # Begin $rc_base/init.d/samba
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
7 . /etc/sysconfig/rc
8 . $rc_functions
10 case "$1" in
11 start)
12 echo "Starting nmbd..."
13 loadproc /usr/sbin/nmbd -D
15 echo "Starting smbd..."
16 loadproc /usr/sbin/smbd -D
19 stop)
20 echo "Stopping smbd..."
21 killproc /usr/sbin/smbd
23 echo "Stopping nmbd..."
24 killproc /usr/sbin/nmbd
27 reload)
28 echo "Reloading smbd..."
29 reloadproc /usr/sbin/smbd
31 echo "Reloading nmbd..."
32 reloadproc /usr/sbin/nmbd
35 restart)
36 $0 stop
37 sleep 1
38 $0 start
41 status)
42 statusproc /usr/sbin/nmbd
43 statusproc /usr/sbin/smbd
47 echo "Usage: $0 {start|stop|reload|restart|status}"
48 exit 1
50 esac
52 # End $rc_base/init.d/samba