blob: d25a8fd9bc8021c5d2b677d52eaea08eb8bfabfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/sbin/runscript
depend() {
need net
}
checkconfig() {
if [ ! -e /etc/smb/smb.conf ] ; then
eerror "You need an /etc/smb/smb.conf file first"
eerror "There is a sample in /usr/share/doc/samba"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting samba"
start-stop-daemon --start --quiet --exec /usr/sbin/nmbd
result=$?
start-stop-daemon --start --quiet --exec /usr/sbin/smbd
result=$(( $result + $? ))
eend $result
}
stop() {
ebegin "Stopping samba"
start-stop-daemon --stop --quiet --exec /usr/sbin/nmbd
result=$?
start-stop-daemon --stop --quiet --exec /usr/sbin/smbd
result=$(( $result + $? ))
eend $result
}
|