Noad.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
(Quelle angegeben (soll ja alles seine Ordnung haben)) |
|||
| Zeile 57: | Zeile 57: | ||
esac | esac | ||
</pre> | </pre> | ||
| + | |||
| + | Quelle: Aus den Sourcen von [[Noad]]. | ||
[[Kategorie:Scripts]] | [[Kategorie:Scripts]] | ||
Version vom 20. November 2004, 18:59 Uhr
#!/bin/sh
#
# sample script for noad
#
# need: noad, at
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NOADOPT="nice --background --jumplogo --ac3 --overlap --OSD --statisticfile=/var/log/noadstat"
case "${1}" in
start)
echo "Recording: "
echo
echo "${2}"
echo
test -e "${2}/noad.pid" && {
echo "Advertising filter is already active."
} || {
echo "/usr/local/bin/noad ${NOADOPT} \"${2}\"" | at now
echo "Advertising filter startet."
}
;;
marks)
echo "Recording: "
echo
echo "${2}"
echo
test -e "${2}/noad.pid" && {
echo "Advertising filter is still active."
echo
}
test -e "${2}/marks.vdr" && {
cat "${2}/marks.vdr"
} || {
echo "There is not missing cut markings."
}
;;
count)
echo "Counting of the advertising filters:"
echo
ps axc|awk "{if (\$5==\"noad\") print \$1}"|wc -w|tr -d ' '
;;
stop)
echo "Recording: "
echo
echo "${2}"
echo
test -e "${2}/noad.pid" && {
kill `cat "${2}/noad.pid"`
echo "Advertising filter stopped."
} || {
echo "Advertising filter is not active."
}
;;
esac
Quelle: Aus den Sourcen von Noad.