summaryrefslogtreecommitdiff
path: root/net/samba/files/samba.sh.sample
blob: 04bf048e2164e658e62b9ee3d811824ba9d66786 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
# 

smbspool=/var/spool/samba
pidfiledir=/var/run
smbd=%%PREFIX%%/sbin/smbd
nmbd=%%PREFIX%%/sbin/nmbd

case "$1" in
start)
	if [ -f $smbd ]; then
		if [ -d $smbspool ]; then
			rm -f $smbspool/*
		fi
		echo -n ' Samba'
		$smbd -D
		$nmbd -D
	fi
	;;
stop)
	kill `cat $pidfiledir/smbd.pid`
	kill `cat $pidfiledir/nmbd.pid`
	;;
*)
	echo "Usage: ${0##*/}: { start | stop }" >&2
	exit 64
	;;
esac