1998-01-09 05:46:01 +01:00
|
|
|
#!/bin/sh
|
|
|
|
smbspool=/var/spool/samba
|
1999-01-18 03:34:06 +01:00
|
|
|
pidfiledir=/var/run
|
1998-01-09 05:46:01 +01:00
|
|
|
smbd=/usr/local/sbin/smbd
|
|
|
|
nmbd=/usr/local/sbin/nmbd
|
|
|
|
|
1999-01-18 03:34:06 +01:00
|
|
|
# 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
|
1998-01-09 05:46:01 +01:00
|
|
|
fi
|
1999-01-18 03:34:06 +01:00
|
|
|
|
|
|
|
# stop
|
|
|
|
elif [ "x$1" = "xstop" ]; then
|
|
|
|
kill `cat $pidfiledir/smbd.pid`
|
|
|
|
kill `cat $pidfiledir/nmbd.pid`
|
1998-01-09 05:46:01 +01:00
|
|
|
fi
|