#
#  Script for otv4vdr plugin.
#
#  It downloads the EPG from Hotbird 10873v. VDR shall have switch to such a channel before.
#
#  You may update it in case of new release of 'otvepg'.
#  Source: http://vdr.bluox.org/download/EPG/otvepg.zip
# 
# $1 -> VDR Config directory
# $2 -> Int 'EPG Downloaded' message
# $3 -> Int 'Error' message
# $4 -> DVB Device No
#

cd "$1/otv4vdr"
rm -f epg.log epg.dat
./otvepg -a $4 >> epg.log
if test ! -f epg.dat;  then
  svdrpsend.pl MESG "$3";
  sleep 3;
  exit;
fi
echo "Download.sh End -------------------------------- " >> epg.log
svdrpsend.pl MESG "$2";
sleep 2

