Tvm2vdr.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
Zeile 53: | Zeile 53: | ||
</pre> | </pre> | ||
}} | }} | ||
+ | |||
+ | [[Kategorie:Skripte]] |
Version vom 22. April 2006, 03:50 Uhr
Skript für tvmovie2vdr. (quelle: tvmovie2vdr)
$PATH/tvm2vdr.sh
#!/bin/sh # # tvm2vdr.sh # # Required: screen, svdrpsend.pl, tvmovie2vdr # # add this lines to your commands.conf: # folgende zeilen in die commands.conf eintragen: # # Run tvmovie2vdr : /path_to_this_script/tvm2vdr.sh tvmovie2vdr # Run tvinfomerk2vdr : /path_to_this_script/tvm2vdr.sh tvinfomerk2vdr # Status : /path_to_this_script/tvm2vdr.sh status # CONFIG START TVMOVIE2VDRDIR="${SOURCEDIR:?}/tvmovie2vdr" # tvmovie2vdr directory CLEANUP="10" # cleanup files (older n*24 hours ago) IMAGEPATH="/video0/epgimages" # where to write downloaded images? LOGFILE="/var/log/vdr/tvm.log" # logfile # CONFIG END # cleanup old images find "$IMAGEPATH" -follow -type f -mtime +${CLEANUP:-100} -exec rm {} \; case $1 in tvmovie2vdr) if screen -ls | egrep -q $1 ; then echo "$1 is already running..." else screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvm2vdr.pl > \"$LOGFILE\" 2>&1" fi ;; tvinfomerk2vdr) if screen -ls | egrep -q $1 ; then echo "$1 is already running..." else screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvinfomerk2vdr.pl > \"$LOGFILE\" 2>&1" fi ;; status) echo "tvmovie2vdr: $(screen -ls | egrep -c tvmovie2vdr)" echo "tvinfomerk2vdr: $(screen -ls | egrep -c tvinfomerk2vdr)" ;; *) echo "Usage: $0 {tvmovie2vdr|tvinfomerk2vdr|status}" >&2 exit 1 esac exit $?