#!/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