Savvy.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
Wirbel (Diskussion | Beiträge) |
|||
(7 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | + | #!/bin/sh | |
− | #!/bin/sh | + | # |
− | # | + | # savvy.sh - v.0.0 |
− | # | + | # |
− | # | + | # add this lines to your [[reccmds.conf]]: |
− | # | + | # folgende zeilen in die [[reccmds.conf]] eintragen: |
+ | # | ||
+ | # Start savvy : /usr/local/bin/savvy.sh -start | ||
+ | # Stop savvy? : /usr/local/bin/savvy.sh -kill | ||
+ | |||
+ | # CONFIG START | ||
+ | SAVVYOPT="-nn" # Don't run "normalize" | ||
+ | # CONFIG END | ||
+ | |||
+ | PATH=$PATH:/usr/local/bin:$SOURCEDIR/savvy | ||
+ | |||
+ | case "$1" in | ||
+ | -start) | ||
+ | msg() { | ||
+ | echo -e "-----------\n$@\n-----------" | ||
+ | } | ||
+ | |||
+ | testproc() { | ||
+ | test "$(ps axc | awk "{if (\$5==\"$1\") print \$1}")" | ||
+ | } | ||
+ | |||
+ | for i in lame wget at savvy mplayer ; do | ||
+ | if ! which $i >/dev/null 2>&1 ; then | ||
+ | msg "ERROR: $i not found..." | ||
+ | exit 1 | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | if testproc savvy ; then | ||
+ | msg "MESG: savvy is already running..." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if ! ping -c 2 www.viva.de >/dev/null 2>&1 ; then | ||
+ | msg "ERROR: check your www connection..." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | cd "$MYPATH/savvy" | ||
+ | |||
+ | rm -f *.html | ||
+ | |||
+ | if ! wget -c http://www.vivaplus.tv/gettheclip.html ; then | ||
+ | msg "ERROR: check your www connection..." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | if ! [ -e gettheclip.html ] ; then | ||
+ | msg "ERROR: gettheclip.html not exist, check the www connection..." | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | at now <<EOF | ||
+ | ./savvy $SAVVYOPT $2/ | ||
+ | EOF | ||
+ | |||
+ | if sleep 1s && testproc savvy ; then | ||
+ | msg "MESG: savvy startet..." | ||
+ | fi | ||
+ | ;; | ||
+ | -kill) | ||
+ | killall savvy | ||
+ | ;; | ||
+ | esac | ||
− | + | [[Kategorie:Veraltete Software]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [[Kategorie: | + |
Aktuelle Version vom 1. September 2013, 13:46 Uhr
#!/bin/sh # # savvy.sh - v.0.0 # # add this lines to your reccmds.conf: # folgende zeilen in die reccmds.conf eintragen: # # Start savvy : /usr/local/bin/savvy.sh -start # Stop savvy? : /usr/local/bin/savvy.sh -kill # CONFIG START SAVVYOPT="-nn" # Don't run "normalize" # CONFIG END PATH=$PATH:/usr/local/bin:$SOURCEDIR/savvy case "$1" in -start) msg() { echo -e "-----------\n$@\n-----------" } testproc() { test "$(ps axc | awk "{if (\$5==\"$1\") print \$1}")" } for i in lame wget at savvy mplayer ; do if ! which $i >/dev/null 2>&1 ; then msg "ERROR: $i not found..." exit 1 fi done if testproc savvy ; then msg "MESG: savvy is already running..." exit 1 fi if ! ping -c 2 www.viva.de >/dev/null 2>&1 ; then msg "ERROR: check your www connection..." exit 1 fi cd "$MYPATH/savvy" rm -f *.html if ! wget -c http://www.vivaplus.tv/gettheclip.html ; then msg "ERROR: check your www connection..." exit 1 fi if ! [ -e gettheclip.html ] ; then msg "ERROR: gettheclip.html not exist, check the www connection..." exit 1 fi at now <<EOF ./savvy $SAVVYOPT $2/ EOF if sleep 1s && testproc savvy ; then msg "MESG: savvy startet..." fi ;; -kill) killall savvy ;; esac