#!/bin/sh
TAPE="/dev/st0"

mt --file=$TAPE status &>/dev/null
if [ $? -eq 2 ]; then
    echo "This is an automated reminder. Please change the server's tape, as it is hungry." | mail -s "Tape forgotten\!" jost,arek
    while [ sleep 60 ]; do
        fugue # Play that funky music
        mt --file=$TAPE status &>/dev/null
        if [ $? -eq 0 ]; then
            exit
        fi
    done
fi