#!/bin/sh # # $FreeBSD: ports/net/samba/files/samba.sh.sample,v 1.4 2006/01/28 07:59:48 dinoex Exp $ # smbspool=/var/spool/samba pidfiledir=/var/run smbd=/usr/local/sbin/smbd nmbd=/usr/local/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