summaryrefslogtreecommitdiff
path: root/net/samba3/files/samba.sh.sample
blob: e6807ad6d14508da27e770ecd774e02a7b21088d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
smbspool=/var/spool/samba
pidfiledir=/var/run
smbd=/usr/local/sbin/smbd
nmbd=/usr/local/sbin/nmbd

# start
if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
	if [ -f $smbd ]; then
		if [ -d $smbspool ]; then
			rm -f $smbspool/*
		fi
		echo -n ' Samba'
		$smbd -D
		$nmbd -D
	fi

# stop
elif [ "x$1" = "xstop" ]; then
	kill `cat $pidfiledir/smbd.pid`
	kill `cat $pidfiledir/nmbd.pid`
fi