Last change
on this file was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
940 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # /etc/rc.d/rc.samba |
---|
4 | # |
---|
5 | # Start/stop/restart the Samba SMB file/print server. |
---|
6 | # |
---|
7 | # To make Samba start automatically at boot, make this |
---|
8 | # file executable: chmod 755 /etc/rc.d/rc.samba |
---|
9 | # |
---|
10 | |
---|
11 | samba_start() { |
---|
12 | if [ -x /usr/sbin/smbd -a -x /usr/sbin/nmbd -a -r /etc/samba/smb.conf ]; then |
---|
13 | mkdir -p /var/run/samba |
---|
14 | echo "Starting Samba: /usr/sbin/smbd -D" |
---|
15 | /usr/sbin/smbd -D |
---|
16 | echo " /usr/sbin/nmbd -D" |
---|
17 | /usr/sbin/nmbd -D |
---|
18 | elif [ ! -r /etc/samba/smb.conf ]; then |
---|
19 | echo "ERROR: cannot start Samba since /etc/samba/smb.conf does not exist" |
---|
20 | fi |
---|
21 | } |
---|
22 | |
---|
23 | samba_stop() { |
---|
24 | killall smbd nmbd |
---|
25 | } |
---|
26 | |
---|
27 | samba_restart() { |
---|
28 | samba_stop |
---|
29 | sleep 2 |
---|
30 | samba_start |
---|
31 | } |
---|
32 | |
---|
33 | case "$1" in |
---|
34 | 'start') |
---|
35 | samba_start |
---|
36 | ;; |
---|
37 | 'stop') |
---|
38 | samba_stop |
---|
39 | ;; |
---|
40 | 'restart') |
---|
41 | samba_restart |
---|
42 | ;; |
---|
43 | *) |
---|
44 | # Default is "start", for backwards compatibility with previous |
---|
45 | # Slackware versions. This may change to a 'usage' error someday. |
---|
46 | samba_start |
---|
47 | esac |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.