#!/bin/sh

# deletes old or corrupted files in sendfile spool directories which are expired
# see /usr/pkg/etc/sendfile.cf for settings

cd `sendfile -qW=spool` || exit 1

for i in *
do
  if [ -d $i ]; then 
    sendfile -d 'hau wech die Scheisse!' $i@127.0.0.1 2>/dev/null
  fi
done
