#!/bin/sh
#------------------------------------------------------------------------------

# adjust the following lines to your config
# path to svdrpsend.pl
SVDRPSEND=/usr/local/bin/svdrpsend.pl

# do not edit below this line
#------------------------------------------------------------------------------


cat << EOM >/tmp/cmd.sh
#make a lstr before just to be sure
$SVDRPSEND lstr >>/dev/null;

if [ "$8" -gt 0 ]; then
    $SVDRPSEND PLAY $8;
else
    $SVDRPSEND MESG "Keine Aufzeichnung gefunden!!";
fi

EOM

echo ". /tmp/cmd.sh; rm /tmp/cmd.sh" | at now
