]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/init.d/samba
proxy: Add option to require a certain group for Internet access.
[ipfire-2.x.git] / src / initscripts / init.d / samba
CommitLineData
559d3ad2
MT
1#!/bin/sh
2# Begin $rc_base/init.d/samba
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
559d3ad2
MT
7. /etc/sysconfig/rc
8. $rc_functions
9
10case "$1" in
11 start)
12 boot_mesg "Starting nmbd..."
13 loadproc /usr/sbin/nmbd -D
14
15 boot_mesg "Starting smbd..."
16 loadproc /usr/sbin/smbd -D
be2817a7
MT
17
18 boot_mesg "Starting winbind..."
19 loadproc /usr/sbin/winbindd
559d3ad2
MT
20 ;;
21
22 stop)
23 boot_mesg "Stopping smbd..."
cb5e9c6c 24 killproc -p /var/run/smbd.pid /usr/sbin/smbd
559d3ad2
MT
25
26 boot_mesg "Stopping nmbd..."
cb5e9c6c 27 killproc -p /var/run/nmbd.pid /usr/sbin/nmbd
be2817a7
MT
28
29 boot_mesg "Stopping winbind..."
30 killproc -p /var/run/winbindd.pid /usr/sbin/winbindd
559d3ad2
MT
31 ;;
32
33 reload)
34 boot_mesg "Reloading smbd..."
35 reloadproc /usr/sbin/smbd
36
37 boot_mesg "Reloading nmbd..."
38 reloadproc /usr/sbin/nmbd
be2817a7
MT
39
40 boot_mesg "Reloading winbind..."
41 reloadproc /usr/sbin/winbindd
559d3ad2
MT
42 ;;
43
44 restart)
45 $0 stop
cb5e9c6c 46 sleep 3
559d3ad2
MT
47 $0 start
48 ;;
49
50 status)
51 statusproc /usr/sbin/nmbd
52 statusproc /usr/sbin/smbd
be2817a7 53 statusproc /usr/sbin/winbindd
559d3ad2
MT
54 ;;
55
56 *)
57 echo "Usage: $0 {start|stop|reload|restart|status}"
58 exit 1
59 ;;
60esac
61
62# End $rc_base/init.d/samba