Advertisement
CoolRaoul

update_epg.sh

Apr 29th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.88 KB | None | 0 0
  1. #! /bin/sh
  2.  
  3. PATH=/opt/bin:/opt/sbin:/usr/syno/bin:/bin:/usr/bin
  4. #+
  5. #   Partie à customiser
  6. #-
  7. PATH=/site/scripts:$PATH
  8. LOGFILE=/volume2/var/log/update_upg.log
  9. URLXMLTV=http://xmltv.dyndns.org/download/tnt_lite.zip
  10. #+
  11. #   log to log file of stderr not a tty (cron)
  12. #-
  13. [ -t 2 ] || exec > $LOGFILE 2>&1    
  14. #+
  15. #   empecher l'exéxcution de la maj epg de videostation
  16. #-
  17. for f in /volume1/@appstore/VideoStation/bin/synodvbepg ; do
  18.     set -- $(ls -l $f)
  19.     [ $5 -le 100 ] && continue # already patched
  20.     if [ ! -f $f.ori ] || ! cmp -s $f $f.ori ; then
  21.         echo >&2 "saving $f as $f.ori"
  22.         cp -p $f $f.ori
  23.     fi
  24.     {
  25.         echo "#! /bin/sh"
  26.         echo "/bin/true"
  27.     } > $f
  28.  
  29. done
  30.  
  31. VSDIR=/usr/syno/etc/packages/VideoStation
  32. EPGDIR=$VSDIR/EPGs/0EPG
  33. CHANCONF=$VSDIR/channels/0channels.conf
  34. mkdir -p $EPGDIR
  35. xml2epg.pl -d $EPGDIR -C $CHANCONF $URLXMLTV
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement