Infosatepg.sh
Aus VDR Wiki
Version vom 20. Februar 2005, 12:14 Uhr von 213.6.81.1 (Diskussion)
#!/bin/sh # # infosatepg.sh - v.0.6 # # add this lines to your commands.conf: # folgende zeilen in die commands.conf eintragen: # # Run infosatepg : /usr/local/bin/infosatepg.sh # Run infosatepg + tvmovie2vdr : /usr/local/bin/infosatepg.sh -tvmovie2vdr # # Edit the config.pl: # # - our $infosaturl="/video/received_data"; # + our $infosaturl="/tmp/received_data"; # CONFIG START INFOSAT_OPT="-v" # options INFOSAT_OUT="/tmp/received_data" # store infosatepg in CHANNEL="VIVA" # which channel, e.g: <NUM> or <NAME> TVMOVIE2VDRDIR="$SOURCEDIR/tvmovie2vdr" # path to tvmovie2vdr STATUS="1" # show status (1=true/0=false) # CONFIG END PATH=$PATH:/usr/local/bin if [ "$(ps axc|awk "{if (\$5==\"infosatepg\") print \$1}")" ] ; then echo "infosatepg is always running..." else at now <<EOF svdrpsend.pl CHAN ${CHANNEL}|grep -e '^250.*' if [ ! \$? -eq 0 ] ; then sleep 2s svdrpsend.pl MESG "switch to ${CHANNEL} failed..." else mkdir -p "${INFOSAT_OUT}" infosatepg ${INFOSAT_OPT} -o "${INFOSAT_OUT}" > "${INFOSAT_OUT}/status" & PID=\$! until ! ps -p \${PID} >/dev/null ; do if [ "${1}" ] ; then STATUS=\$(grep -s [0-9]% "${INFOSAT_OUT}/status"|tail -n 1) eval \${STATUS:+svdrpsend.pl MESG "\${STATUS}"} fi sleep 30s done if grep -qs complete "${INFOSAT_OUT}/status" ; then svdrpsend.pl MESG "infosatepg done..." fi if [ "${1}" -a -d "${TVMOVIE2VDRDIR}" ] ; then cd "${MYPATH}/tvmovie2vdr" ./tvm2vdr.pl >/var/log/tvmovie2vdr.log fi fi EOF fi