Cutinplace.sh
Aus VDR Wiki
Version vom 21. Oktober 2005, 09:02 Uhr von 87.128.1.14 (Diskussion)
Script für cutinplace.
#!/bin/sh
#
# cutinplace.sh
#
# Required: at, cutinplace
#
# add this lines to your reccmds.conf:
# folgende zeilen in die reccmds.conf eintragen:
#
# cutinplace (at) : /path_to_this_script/cutinplace.sh -at
# cutinplace : /path_to_this_script/cutinplace.sh -start
# CONFIG START
MAX_IN_MB="600" # max size -> cut without at
# CONFIG END
PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
case "$1" in
-at)
at now <<EOT
svdrpsend.pl -p ${VDR_PORT:-2001} MESG "Editing process started" >/dev/null
cutinplace "$2" >/dev/null
svdrpsend.pl -p ${VDR_PORT:-2001} MESG "Editing process finished" >/dev/null
EOT
;;
-start)
VAR=$(($(find "$2" -printf %k+)0))
if [ "$((VAR/1024))" -gt "$MAX_IN_MB" ] ; then
echo "Record to large ($((VAR/1024))Mb -gt ${MAX_IN_MB}Mb), use better at..."
else
cutinplace "$2"
fi
;;
esac