--- record-stream.sh 2009/10/28 19:18:52 9 +++ record-stream.sh 2009/10/29 11:55:14 13 @@ -4,14 +4,14 @@ adapter=$1 channel=$2 -time=$3 +duration=$3 if [ -z "$adapter" -o -z "$channel" -o -z "$time" ] ; then echo "Usage: $0 adapter_nr Channel_name duration" exit 1; fi -dir=/mnt/usb/ +dir=/mnt/tv/ uid=`date +%Y-%m-%d_%H:%M:%S` file=$dir/$uid-$channel.ts @@ -29,9 +29,8 @@ trap "kill $TZAP_PID $STREAM_PID" 1 2 15 # Set duration of recording after converting minutes to seconds -DURATION=$(($time*60)) -echo "record $DURATION s" -sleep $DURATION +echo "record $duration s" +sleep $duration kill $TZAP_PID kill $STREAM_PID