Cutinplace.sh
Aus VDR Wiki
(Unterschied zwischen Versionen)
Zeile 27: | Zeile 27: | ||
VAR=$(($(find "${2}" -printf %k+)0)) | VAR=$(($(find "${2}" -printf %k+)0)) | ||
test "$((VAR/1024))" -gt "${MAX_IN_MB}" && { | test "$((VAR/1024))" -gt "${MAX_IN_MB}" && { | ||
− | echo "Record to large ($((VAR / 1024))Mb -gt ${MAX_IN_MB}Mb), use better at..." | + | echo "Record to large ($((VAR/1024))Mb -gt ${MAX_IN_MB}Mb), use better at..." |
exit 1 | exit 1 | ||
} | } |
Version vom 8. Dezember 2004, 17:27 Uhr
#!/bin/sh # # cutinplace.sh - v.0.1 # # add this lines to your reccmds.conf: # folgende zeilen in die reccmds.conf eintragen: # # cutinplace (at) : /usr/local/bin/cutinplace.sh -at # cutinplace : /usr/local/bin/cutinplace.sh -start # CONFIG START MAX_IN_MB="600" # max size -> cut without at # CONFIG END PATH=$PATH:/usr/local/bin case "${1}" in -at) at now <<EOF svdrpsend.pl MESG "Editing process started" cutinplace "${2}" svdrpsend.pl MESG "Editing process finished" EOF ;; -start) VAR=$(($(find "${2}" -printf %k+)0)) test "$((VAR/1024))" -gt "${MAX_IN_MB}" && { echo "Record to large ($((VAR/1024))Mb -gt ${MAX_IN_MB}Mb), use better at..." exit 1 } cutinplace "${2}" ;; esac