]>
Commit | Line | Data |
---|---|---|
60cbd6e7 MT |
1 | #!/bin/sh |
2 | # Begin /etc/init.d/samba | |
3 | ||
4 | # Based on sysklogd script from LFS-3.1 and earlier. | |
5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org | |
6 | ||
7 | #$LastChangedBy: bdubbs $ | |
8 | #$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ | |
9 | ||
10 | . /etc/init.d/init-functions | |
11 | ||
12 | case "$1" in | |
13 | start) | |
14 | boot_mesg "Starting nmbd..." | |
15 | loadproc /usr/sbin/nmbd -D | |
16 | ||
17 | boot_mesg "Starting smbd..." | |
18 | loadproc /usr/sbin/smbd -D | |
19 | ;; | |
20 | ||
21 | stop) | |
22 | boot_mesg "Stopping smbd..." | |
23 | killproc /usr/sbin/smbd | |
24 | ||
25 | boot_mesg "Stopping nmbd..." | |
26 | killproc /usr/sbin/nmbd | |
27 | ;; | |
28 | ||
29 | reload) | |
30 | boot_mesg "Reloading smbd..." | |
31 | reloadproc /usr/sbin/smbd | |
32 | ||
33 | boot_mesg "Reloading nmbd..." | |
34 | reloadproc /usr/sbin/nmbd | |
35 | ;; | |
36 | ||
37 | restart) | |
38 | $0 stop | |
39 | sleep 1 | |
40 | $0 start | |
41 | ;; | |
42 | ||
43 | status) | |
44 | statusproc /usr/sbin/nmbd | |
45 | statusproc /usr/sbin/smbd | |
46 | ;; | |
47 | ||
48 | *) | |
49 | echo "Usage: $0 {start|stop|reload|restart|status}" | |
50 | exit 1 | |
51 | ;; | |
52 | esac | |
53 | ||
54 | # End /etc/init.d/samba |