Tvm2vdr.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
Zeile 17: | Zeile 17: | ||
# CONFIG START | # CONFIG START | ||
− | |||
TVMOVIE2VDRDIR="${SOURCEDIR:?}/tvmovie2vdr" # tvmovie2vdr directory | TVMOVIE2VDRDIR="${SOURCEDIR:?}/tvmovie2vdr" # tvmovie2vdr directory | ||
TVMOVIE2VDROPT="-v" # tvmovie2vdr options (tvim2vdr.pl -help) | TVMOVIE2VDROPT="-v" # tvmovie2vdr options (tvim2vdr.pl -help) |
Aktuelle Version vom 22. April 2006, 04:03 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 TVMOVIE2VDROPT="-v" # tvmovie2vdr options (tvim2vdr.pl -help) TVINFOMERK2VDROPT="-v" # tvinfomerk2vdr options (tvinfomerk2vdr.pl -help) 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 $TVMOVIE2VDROPT > \"$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 $TVINFOMERK2VDROPT > \"$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 $?