updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / tvmovie2vdr / tvm2vdr.sh
blob40ae65c0a946b332e644cc76e14c4d6b16269e76
1 #!/bin/bash
2 . /etc/rc.tvm2vdr
4 if [ -f /var/run/tvm2vdr.run ]; then
5 echo already one tvm2vdr running
6 echo if there is no tvm2vdr running, remove
7 echo /var/run/tvm2vdr.run and retry.
8 exit
9 fi
10 touch /var/run/tvm2vdr.run
12 if [ $SETSYSTIME == "Y" ]; then
13 echo Synchronizing time at `date` >> /var/log/tvm2vdr.log
14 /etc/rc.d/ntpdate start > /dev/null
15 echo Time sychronized at `date` >> /var/log/tvm2vdr.log
18 # start tvmovie2vdr
19 cd /usr/lib/vdr/tvmovie2vdr
20 /usr/lib/vdr/tvmovie2vdr/tvm2vdr >> /var/log/tvm2vdr.log 2>&1
22 # cleanup old images
23 find /video/epgimages/ -type f -mtime +10 -exec rm {} \;
25 # shutting down, if requested
26 if [ $SYSPOWERDOWN == "Y" ]; then
27 sleep 60
28 echo stopping and shutting down at `date` >> /var/log/tvm2vdr.log
29 /usr/bin/svdrpsend.pl hitk power
32 rm /var/run/tvm2vdr.run