Annotation of /trunk/samba/samba.rc
Parent Directory | Revision Log
Revision 153 -
(hide annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1101 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1101 byte(s)
-import
1 | niro | 153 | #!/bin/bash |
2 | # $Header: /root/magellan-cvs/src/samba/samba.rc,v 1.1 2007-05-08 20:32:56 niro Exp $ | ||
3 | |||
4 | #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k | ||
5 | #%start: 24 | ||
6 | #%stop: 48 | ||
7 | |||
8 | #deps | ||
9 | #%needs: | ||
10 | #%before: | ||
11 | #%after: | ||
12 | |||
13 | source /etc/sysconfig/rc | ||
14 | source $rc_functions | ||
15 | case "$1" in | ||
16 | start) | ||
17 | echo -e ${COLOREDSTAR}"Starting netbios daemon ..." | ||
18 | loadproc /usr/sbin/nmbd -D | ||
19 | echo -e ${COLOREDSTAR}"Starting samba daemon ..." | ||
20 | loadproc /usr/sbin/smbd -D | ||
21 | |||
22 | update_svcstatus $1 | ||
23 | splash svc_started "$(basename $0)" 0 | ||
24 | ;; | ||
25 | stop) | ||
26 | echo -e ${COLOREDSTAR}"Stopping samba daemon ..." | ||
27 | killproc /usr/sbin/smbd | ||
28 | echo -e ${COLOREDSTAR}"Stopping netbios daemon ..." | ||
29 | killproc /usr/sbin/nmbd | ||
30 | |||
31 | update_svcstatus $1 | ||
32 | splash svc_stopped "$(basename $0)" 0 | ||
33 | ;; | ||
34 | reload) | ||
35 | echo -e ${COLOREDSTAR}"Reloading samba daemon ..." | ||
36 | reloadproc /usr/sbin/smbd | ||
37 | echo -e ${COLOREDSTAR}"Reloading netbios daemon ..." | ||
38 | reloadproc /usr/sbin/nmbd | ||
39 | ;; | ||
40 | restart) | ||
41 | $0 stop | ||
42 | sleep 1 | ||
43 | $0 start | ||
44 | ;; | ||
45 | status) | ||
46 | statusproc /usr/sbin/nmbd | ||
47 | statusproc /usr/sbin/smbd | ||
48 | ;; | ||
49 | *) | ||
50 | echo "Usage: $0 {start|stop|reload|restart|status}" | ||
51 | exit 1 | ||
52 | ;; | ||
53 | esac |