Tvm2vdr.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
 
 
(2 dazwischenliegende Versionen von einem Benutzer werden nicht angezeigt)
Zeile 18: Zeile 18:
 
# CONFIG START
 
# CONFIG START
 
   TVMOVIE2VDRDIR="${SOURCEDIR:?}/tvmovie2vdr"  # tvmovie2vdr directory
 
   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)
 
   CLEANUP="10"                                # cleanup files (older n*24 hours ago)
 
   IMAGEPATH="/video0/epgimages"                # where to write downloaded images?
 
   IMAGEPATH="/video0/epgimages"                # where to write downloaded images?
Zeile 31: Zeile 33:
 
    echo "$1 is already running..."
 
    echo "$1 is already running..."
 
else
 
else
    screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvm2vdr.pl > \"$LOGFILE\" 2>&1"
+
    screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvm2vdr.pl $TVMOVIE2VDROPT > \"$LOGFILE\" 2>&1"
 
fi
 
fi
 
;;
 
;;
Zeile 38: Zeile 40:
 
    echo "$1 is already running..."
 
    echo "$1 is already running..."
 
else
 
else
    screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvinfomerk2vdr.pl > \"$LOGFILE\" 2>&1"
+
    screen -dmS $1 sh -c "cd \"$TVMOVIE2VDRDIR\" ; ./tvinfomerk2vdr.pl $TVINFOMERK2VDROPT > \"$LOGFILE\" 2>&1"
 
fi
 
fi
 
;;
 
;;
Zeile 53: Zeile 55:
 
</pre>
 
</pre>
 
}}
 
}}
 +
 +
[[Kategorie:Skripte]]

Aktuelle Version vom 22. April 2006, 04:03 Uhr

Skript für tvmovie2vdr. (quelle: tvmovie2vdr)

Datei
$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 $?