summaryrefslogtreecommitdiff
path: root/Tools/epg2timers/update_timers.old
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/epg2timers/update_timers.old')
-rwxr-xr-xTools/epg2timers/update_timers.old24
1 files changed, 24 insertions, 0 deletions
diff --git a/Tools/epg2timers/update_timers.old b/Tools/epg2timers/update_timers.old
new file mode 100755
index 0000000..c4c3f5c
--- /dev/null
+++ b/Tools/epg2timers/update_timers.old
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# update_timers: load a new "merkliste" from http://tvtv.de
+# and create a new VDR timer configuration file (timers.conf)
+# from it. Restart VDR if the timers have changed.
+
+TOOLDIR="/home/cko/bin"
+VDRDIR="/home/cko/VDR"
+
+cd /tmp
+rm -f merkliste.html epgtimers.new epgtimers.old vdrtimers.old
+ping -c 2 www.tvtv.de
+$TOOLDIR/get_merkliste.pl
+if [ -s merkliste.html ] ; then
+ $TOOLDIR/epg2timers $VDRDIR/channels.conf < merkliste.html | sort -t: +2.0 -5.0 > epgtimers.new
+ fgrep '(epg2timers)' $VDRDIR/timers.conf | sort -t: +2.0 -5.0 > epgtimers.old
+ if ! cmp -s epgtimers.old epgtimers.new ; then
+ /sbin/killproc $VDRDIR/vdr
+ fgrep -v '(epg2timers)' $VDRDIR/timers.conf > vdrtimers.old
+ cat epgtimers.new vdrtimers.old | sort -t: +2.0 -5.0 > $VDRDIR/timers.conf
+ echo "Timers updated."
+ fi
+fi
+rm -f merkliste.html epgtimers.new epgtimers.old vdrtimers.old