Annotation of /trunk/samba/samba.rc
Parent Directory | Revision Log
Revision 1345 -
(hide annotations)
(download)
Fri Jun 3 12:12:48 2011 UTC (13 years, 5 months ago) by niro
File size: 1026 byte(s)
Fri Jun 3 12:12:48 2011 UTC (13 years, 5 months ago) by niro
File size: 1026 byte(s)
-added systemd units
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 | niro | 1345 | rc_print "Starting netbios daemon ..." |
18 | niro | 153 | loadproc /usr/sbin/nmbd -D |
19 | niro | 1345 | rc_print "Starting samba daemon ..." |
20 | niro | 153 | loadproc /usr/sbin/smbd -D |
21 | |||
22 | update_svcstatus $1 | ||
23 | splash svc_started "$(basename $0)" 0 | ||
24 | ;; | ||
25 | stop) | ||
26 | niro | 1345 | rc_print "Stopping samba daemon ..." |
27 | niro | 153 | killproc /usr/sbin/smbd |
28 | niro | 1345 | rc_print "Stopping netbios daemon ..." |
29 | niro | 153 | killproc /usr/sbin/nmbd |
30 | |||
31 | update_svcstatus $1 | ||
32 | splash svc_stopped "$(basename $0)" 0 | ||
33 | ;; | ||
34 | reload) | ||
35 | niro | 1345 | rc_print "Reloading samba daemon ..." |
36 | niro | 153 | reloadproc /usr/sbin/smbd |
37 | niro | 1345 | rc_print "Reloading netbios daemon ..." |
38 | niro | 153 | 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 | niro | 1345 | rc_echo "Usage: $0 {start|stop|reload|restart|status}" |
51 | niro | 153 | exit 1 |
52 | ;; | ||
53 | esac |