freebsd-ports/japanese/samba/files/samba.sh.sample
Akinori MUSHA e8de448b94 - Update to 2.2.2-ja-1.0.
- Invoke nmbd in advance of smbd to avoid failing in startup.

PR:		ports/33676
Submitted by:	NAKAJI Hiroyuki <nakaji@jp.freebsd.org> (MAINTAINER)

- Add CVS tags.

- Replace /usr/local in the startup script with ${PREFIX}.
2002-01-19 11:05:29 +00:00

30 lines
471 B
Bash

#!/bin/sh
#
# $FreeBSD$
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'
$nmbd -D
$smbd -D
fi
# stop
elif [ "x$1" = "xstop" ]; then
kill `cat $pidfiledir/smbd.pid`
kill `cat $pidfiledir/nmbd.pid`
# restart
elif [ "x$1" = "xrestart" ]; then
$0 stop
$0 start
fi