Last change
on this file since 1036 was 1, checked in by Paul Smedley, 18 years ago |
Initial code import
|
File size:
887 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # chkconfig: 345 81 35
|
---|
4 | # description: Starts and stops the Samba smbd and nmbd daemons \
|
---|
5 | # used to provide SMB network services.
|
---|
6 |
|
---|
7 | # Source function library.
|
---|
8 | . /etc/rc.d/init.d/functions
|
---|
9 |
|
---|
10 | # Source networking configuration.
|
---|
11 | . /etc/sysconfig/network
|
---|
12 |
|
---|
13 | # Check that networking is up.
|
---|
14 | [ ${NETWORKING} = "no" ] && exit 0
|
---|
15 |
|
---|
16 | CONFIG=/etc/samba/smb.conf
|
---|
17 |
|
---|
18 | # Check that smb.conf exists.
|
---|
19 | [ -f $CONFIG ] || exit 0
|
---|
20 |
|
---|
21 | # See how we were called.
|
---|
22 | case "$1" in
|
---|
23 | start)
|
---|
24 | echo -n "Starting SMB services: "
|
---|
25 | daemon smbd -D
|
---|
26 | daemon nmbd -D
|
---|
27 | echo
|
---|
28 | touch /var/lock/subsys/smb
|
---|
29 | ;;
|
---|
30 | stop)
|
---|
31 | echo -n "Shutting down SMB services: "
|
---|
32 |
|
---|
33 | killproc smbd
|
---|
34 | killproc nmbd
|
---|
35 | rm -f /var/lock/subsys/smb
|
---|
36 | echo ""
|
---|
37 | ;;
|
---|
38 | status)
|
---|
39 | status smbd
|
---|
40 | status nmbd
|
---|
41 | ;;
|
---|
42 | restart)
|
---|
43 | echo -n "Restarting SMB services: "
|
---|
44 | $0 stop
|
---|
45 | $0 start
|
---|
46 | echo "done."
|
---|
47 | ;;
|
---|
48 | *)
|
---|
49 | echo "Usage: smb {start|stop|restart|status}"
|
---|
50 | exit 1
|
---|
51 | esac
|
---|
52 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.